Overview
The ZBD Widget is an embeddable iframe that handles the full cashout flow for your users — identity verification (KYC), bank account linking (Plaid), and ACH payouts. Your backend handles user creation, session minting, and balance funding; the widget handles everything else.Prerequisites
Before integrating:- Make sure you already have a ZBD Developer Dashboard account and a project.
- Copy the project API key from the project’s API section.
- Open the Widget tab in the Developer Dashboard to configure sandbox balance and webhook settings.
- If the Widget tab is not available yet, contact ZBD support to enable it for your project.
Quick Start
To get sandbox running quickly, start with the sandbox guide:- Create a sandbox user.
- Fund the sandbox user.
- Create a widget session.
- Embed the returned
widget_urlin your frontend. - Listen for widget events and webhook deliveries.
Integration Flow
POST /api/v1/widget/users/deplete when your server needs to debit points back from a widget user’s point balance.
Events
The ZBD Widget emits browser events to your frontend and server webhooks to your backend.Browser Events
Handle iframe callbacks in your frontend.
Server Webhooks
Process signed backend webhook deliveries.
Authentication
Widget endpoints use two auth patterns:| Context | Auth | Header |
|---|---|---|
| Your server → ZBD | Publisher API key | apikey: YOUR_API_KEY |
| Widget iframe → ZBD | Session JWT (automatic) | Authorization: Bearer {session_token} |
Embedding the Widget
After creating a session, load the returnedwidget_url in your client. Your backend should create the session; your game or web client only receives the widget_url.
- Web
- Unity
- Unreal
Embed Parameters
Pass these as URL query parameters on the widget URL:| Parameter | Required | Description |
|---|---|---|
session_token | Yes | JWT from Create Session |
flow | No | cashout (default), kyc, add-method |
theme | No | zbd-default, zbd-light |
embed | No | true for chrome-less mode (no header/footer) |
component | No | balance, history, method-picker for standalone components |