Skip to main content
The widget runs the steps where ZBD collects something from the player, and gives you ready-made views of their balance and history. You embed it in your game and choose which flows to use and where they appear.

Flows

ZBD collects tax information within these flows when a cash out requires it. If a player opens the cash out flow before they’ve verified or chosen a payment method, the widget takes them through those steps first.

Embedding a flow

1

Create a session with the flows you need

Call Create a Session from your server with the flows this session can open, for example ["kyc"] at signup. Your API key never reaches the game client, and the player can’t open a flow you didn’t list. The response includes a widget_url.
2

Load the widget

Load the URL in an iframe or WebView at the point in your product where the flow should appear. See Code examples.
3

Listen for events

Your frontend receives browser events as the player moves through the flow, for example when they finish verification or add a payment method. Cash out status changes reach your backend by webhook.
One session can open any of the flows you listed without the player signing in again. For example, a session with ["kyc", "cashout"] can verify a player and take them straight into their first cash out.

Embed parameters

These control how the widget looks. Add them as query parameters on the widget_url returned by Create a Session. Don’t build the widget URL or hostname yourself, and choose flows on the session, not in the URL.

Code examples

The widget needs camera and microphone access for identity verification, so keep the allow attribute.
Allow downloads. Players can download documents from the widget, such as disclosures and cash out receipts. If you set a sandbox attribute on the iframe, it has to include allow-downloads, as in the example above. Without it, the browser blocks the download and the widget opens the document in a new tab instead. If you don’t set a sandbox attribute, downloads work by default.