Overview
Every ZBD project includes a sandbox environment for testing the ZBD Widget integration end-to-end. Sandbox mode simulates the entire flow — funding users, initiating cashouts, and receiving webhooks — without moving real money through ACH or requiring real identity verification.Sandbox API keys are separate from production keys. Make sure you’re using the right key for the right environment.
https://sandbox-api.zbdpay.com
What Sandbox Does
| Feature | Sandbox | Production |
|---|---|---|
| User creation | Creates sandbox-scoped widget users | Creates production widget users |
| Balance funding | Credits test reward balance; no live pool is debited | Transfers publisher points from your live pool |
| KYC / Identity | Controlled through sandbox KYC status helpers; no live Onfido review | Required for bank cashouts |
| Bank linking (Plaid) | Full Plaid sandbox flow | Real bank connections |
| ACH payout | Simulated when sandbox bypass is enabled; no real transfer | Real ACH via banking partner |
| Webhooks | Fire normally to your webhook_url | Same |
| Widget UI | Identical to production | Same |
Getting Started
1. Get Your Sandbox API Key
In the ZBD Developer Dashboard, navigate to your project’s API tab and copy the Sandbox key.2. Create a Test User
Sandbox user creation uses a sandbox-only endpoint. Use the returned
data.id as zbd_user_id when funding the user and as the user ID when setting KYC status. Use POST /api/v1/widget/users only for production widget users.3. Fund the Test User
In sandbox, funding transfers don’t debit a real pool. The balance is credited for testing purposes.
4. Create a Widget Session
5. Open the Widget
Embed the returnedwidget_url in an iframe. In sandbox, the URL should point at https://widget.sandbox.zbd.gg. The widget behaves identically to production — same UI, same flows — but cashouts complete without real bank transfers.
When you reach bank linking in sandbox, you can use the Plaid sandbox institution Platypus First Bank with the credentials
user_good / pass_good. If Plaid asks for a phone number step, you can bypass it in the sandbox flow.When you reach KYC in sandbox, use a US address so the approval path can complete successfully.
Sandbox Controls
Use these sandbox-only controls onhttps://sandbox-api.zbdpay.com with apikey: YOUR_SANDBOX_API_KEY to put a test user or monetary account into a known state before opening the widget.
For user rewards, use POST /api/v1/widget/users/fund and POST /api/v1/widget/users/deplete. The monetary-account helpers below are for state setup when you already have the monetary account ID.
| Control | Endpoint | Request body |
|---|---|---|
| Create sandbox user | POST /api/v1/cashout/sandbox/users | { "reference_id": "test-player-1", "email": "test@yourcompany.com" } |
| Set user KYC status | POST /api/v1/principal-accounts/{zbd_user_id}/kyc-status | { "status": "approved", "country_code": "US" } |
| Add sandbox balance | POST /api/v1/monetary-accounts/{monetary_account_id}/fund | { "amount": 5000 } |
| Remove sandbox balance | POST /api/v1/monetary-accounts/{monetary_account_id}/deplete | { "amount": 5000 } |
status must be approved, rejected, or processing. Include country_code when setting approved.
Balance helper amounts use currency minor units. For USD, 5000 means $50.00.
ACH return-code simulation and explicit payout failure-mode controls are still being wired for sandbox. Until those controls are available, use the webhook examples to prepare your handler for
cashout.failed and cashout.returned events.Sandbox Webhooks
Sandbox webhooks fire to yourwebhook_url with the same payload structure as production:
cashout.completed webhook can fire shortly after cashout.initiated since there’s no real ACH settlement delay. See Server Webhooks for the full event reference.