Balance
Your LB Pay balance is the authoritative record of funds available to your operation. Query it in real time to validate cash flow before authorising withdrawals, and at day close to reconcile against your internal ledger.
API: GET /v1/balance/realtime, GET /v1/balance/closing-day
Real-time balance
curl --request GET \
--url "https://api.sdb.lbpay.com.br/v1/balance/realtime" \
--header "Authorization: Bearer $TOKEN"
Use it to answer "can this withdrawal be funded right now". A withdrawal requested against insufficient merchant balance is rejected by the API — validate first and give the player a meaningful message instead of a failed transaction.
The response separates three figures, and choosing the wrong one causes rejected withdrawals:
| Field | What it means |
|---|---|
availableBalance | Funds you can actually move now. Authorise withdrawals against this. |
pendingBalance | Funds still settling, not yet usable |
totalBalance | Available plus pending — a reporting figure, not a spending limit |
All amounts are integer cents, and timestamps come back in BRT (UTC−3).
Your LB Pay balance is the pooled operational balance. The individual player wallet lives in your system. Never confuse the two: a player may have balance while your LB Pay account does not have the funds to settle it.
Closing-day balance
GET /v1/balance/closing-day?dateRef=2026-03-20 returns the position for a specific day.
The dateRef parameter is required, in YYYY-MM-DD format. Compare its totalBalance with
the balance your own ledger computed. Any divergence must be
investigated before you open the next day — a discrepancy carried forward compounds and
becomes progressively harder to attribute.
Related
- Statement — the transaction-level ledger
Error codes
Routes: GET /v1/balance/realtime, GET /v1/balance/closing-day
| HTTP | Error code | Description |
|---|---|---|
400 | InvalidParameter | Missing or malformed dateRef on closing-day (YYYY-MM-DD required) |
404 | NotFound | Account not found for the authenticated context |
See HTTP errors for the codes shared by every route.