Wallet
Wallet overview
GET
/api/v2/wallet/overviewBalance, remaining daily limit, reserved cashback, and lifetime totals in one call. Every figure is read live from the merchant's OWN wallet or derived from observed events — none of it is money Trevi holds.
- Dashboard-only (merchant JWT).
wallet.balance_satsandwallet.remaining_limit_satscome from a live NWC round trip to the merchant's wallet.remaining_limit_satsis null when the wallet reports no limit or declines to report one.wallet.reserved_satsis cashback already promised on the merchant's behalf and not yet sent — it is subtracted from what the next customer can be offered.wallet.available_satsapplies the same arithmetic as the guard rail (balance, limit and reservations together), so it never promises more headroom than a customer will really be offered.- A wallet that cannot be reached does not blank the page:
balance_satsandremaining_limit_satsdegrade to null andwallet.errorcarries the reason. Everything else still renders. Treat null as "unavailable", never as zero. statsare lifetime totals derived from observed events, never read off a stored balance — there is no balance to read.
Authentication
Requires a dashboard session JWT in the Authorization: Bearer … header.
GET
/api/v2/wallet/overviewcurl "https://api.trevi.cash/api/v2/wallet/overview" --header "Authorization: Bearer $TREVI_JWT"200Sample response
{
"success": true,
"connected": true,
"wallet": {
"balance_sats": 250000,
"remaining_limit_sats": 100000,
"reserved_sats": 4500,
"available_sats": 95500,
"error": null
},
"cashback_config": {
"enabled": true,
"percentage": 0.03,
"max_per_transaction": 50000
},
"external_ln_address": "store@getalby.com",
"stats": {
"sales_volume_sats": 1250000,
"cashback_sent_sats": 37500
}
}Was this page helpful?
