Recommended Update Strategy
It is recommended not to implement balance updates using increment/decrement logic from webhook amounts. Instead, always overwrite balances using the latest balance values returned in webhook payloads to prevent drift, duplicate accounting, or inconsistent wallet state.| Product | Balance Source | Recommended Handling |
|---|---|---|
| Wallet-as-a-Service | wallet.asset.balance or wallet.assets[].balance | Replace the stored wallet balance directly using the latest balance value returned in the webhook payload. |
| Smart Accounts | wallet.token.balance.value or wallet.tokens[].balance.value | Replace the token balance directly using the latest balance.value returned for the token in the webhook payload. |
Samples
Wallet-as-a-Service
Wallet-as-a-Servicebalances may not always map 1:1 to immediate onchain balances because the platform supports off-chain ledger operations, internal transfers, settlement abstractions, and managed wallet accounting.
Use the balance from:
wallet → asset or assets → balance
- Current wallet balance:
wallet.asset.balance = 9
Smart Accounts
Smart Accountwallets are always synchronized with onchain state. Balance values returned in webhook events reflect the latest blockchain state for the wallet and token.
Use the balance from:
wallet → token or tokens → balance → value
- Human-readable balance:
balance.value = "20" - Raw blockchain balance:
balance.rawValue = "20000000"
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=062e79ad9c4540929eec204aff020178)
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=f6328956931c9664a2a070c2edb6e9b3)