> ## Documentation Index
> Fetch the complete documentation index at: https://docs.breet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Betting & gaming

> Enable crypto deposits and bank payouts for betting and gaming platforms. Accept stablecoins and settle winnings to local accounts with Breet.

Let players fund their betting balance with crypto and withdraw winnings to their bank account or as stablecoins. Breet handles wallet generation, deposit tracking, and payout processing so your platform can focus on the gaming experience.

## How it works

<Steps>
  <Step title="Generate a deposit address per player">
    Call the [generate-address](/api-reference/crypto-wallet/generate-wallet-address) endpoint with the player's internal ID as the `label`. Each address is permanent, so you only need to generate it once per player per asset. Store it and display it whenever the player initiates a deposit.
  </Step>

  <Step title="Player sends crypto">
    Display the wallet address in your deposit flow. The player sends crypto from any external wallet or exchange.
  </Step>

  <Step title="Receive a webhook and credit the balance">
    Breet sends a [webhook](/webhooks) when the deposit is confirmed on-chain. Parse the payload and credit the player's betting balance.
  </Step>

  <Step title="Player withdraws winnings">
    When a player requests a withdrawal, call [`POST /payments/withdraw/address`](/api-reference/withdrawals/withdraw-stable-coins) to send stablecoins to their wallet, or [`POST /payments/withdraw/bank/{id}`](/api-reference/withdrawals/withdrawal-ngn-|-ghs) to settle to a bank account.
  </Step>
</Steps>

## Generate a deposit address

```bash theme={null}
curl -X POST "https://api.breet.io/v1/trades/sell/assets/ASSET_ID/generate-address" \
  -H "x-app-id: YOUR_APP_ID" \
  -H "x-app-secret: YOUR_APP_SECRET" \
  -H "X-Breet-Env: production" \
  -H "Content-Type: application/json" \
  -d '{"label": "player-78901"}'
```

Replace `ASSET_ID` with the asset the player wants to deposit (e.g., USDT, BTC). The `label` field ties the address to a specific player for automatic reconciliation. Each address is **permanent**, so you only need to generate it once per player per asset.

<Tip>
  Generate a unique address per player so deposits are automatically attributed without manual matching.
</Tip>

## What Breet handles

* Generating unique deposit addresses per player
* Monitoring blockchains for incoming deposits
* Sending real-time webhook notifications
* Processing stablecoin withdrawals to player wallets
* Auto-settlement to local bank accounts (NGN or GHS)

## What you handle

* Displaying deposit addresses and QR codes in your platform
* Listening for and processing webhook events
* Crediting and debiting player balances
* Managing withdrawal requests and payout logic
* Enforcing your platform's deposit and withdrawal limits

## Example user journey

1. Chidi opens a betting platform and taps **Deposit**.
2. He selects **USDT on Tron** as his deposit method.
3. If this is Chidi's first deposit, the platform calls Breet's [generate-address](/api-reference/crypto-wallet/generate-wallet-address) endpoint and stores the returned TRC-20 wallet address. For future deposits, the platform displays the same saved address since it is permanent.
4. Chidi sends 100 USDT from his exchange account.
5. Breet detects the deposit and sends a `trade.completed` webhook.
6. The platform credits 100 USDT to Chidi's betting balance.
7. After a winning streak, Chidi requests a withdrawal of 250 USDT.
8. The platform calls [`POST /payments/withdraw/address`](/api-reference/withdrawals/withdraw-stable-coins) to send 250 USDT to Chidi's personal wallet.
9. Chidi receives the stablecoins and a `withdrawal.completed` webhook confirms the payout.

## FAQ

<AccordionGroup>
  <Accordion title="Can players withdraw in crypto?">
    Yes. Use [`POST /payments/withdraw/address`](/api-reference/withdrawals/withdraw-stable-coins) to send stablecoins (USDT or USDC) to any wallet address the player provides. You can also settle winnings to a bank account using [`POST /payments/withdraw/bank/{id}`](/api-reference/withdrawals/withdrawal-ngn-|-ghs).
  </Accordion>

  <Accordion title="Can I generate a unique address per player?">
    Yes. Each call to the [generate-address](/api-reference/crypto-wallet/generate-wallet-address) endpoint returns a new address. Use the `label` field to tag it with the player's ID so incoming deposits are automatically mapped to the correct account.
  </Accordion>

  <Accordion title="Is there a minimum deposit amount?">
    Deposits below the network's minimum threshold may be flagged. Breet sends a `trade.flagged` webhook when a deposit falls below the asset minimum. Check the [supported assets](/supported-assets) page for minimum amounts.
  </Accordion>

  <Accordion title="How do I handle deposits during downtime?">
    Breet monitors the blockchain independently of your platform's availability. If your webhook endpoint is unreachable, Breet retries delivery using an exponential backoff schedule. See [webhook retries](/webhooks#webhook-retries) for the full retry timeline.
  </Accordion>
</AccordionGroup>
