Pular para o conteúdo principal

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:

FieldWhat it means
availableBalanceFunds you can actually move now. Authorise withdrawals against this.
pendingBalanceFunds still settling, not yet usable
totalBalanceAvailable plus pending — a reporting figure, not a spending limit

All amounts are integer cents, and timestamps come back in BRT (UTC−3).

Merchant balance is not player balance

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.

Error codes​

Routes: GET /v1/balance/realtime, GET /v1/balance/closing-day

HTTPError codeDescription
400InvalidParameterMissing or malformed dateRef on closing-day (YYYY-MM-DD required)
404NotFoundAccount not found for the authenticated context

See HTTP errors for the codes shared by every route.