Seller balance
Bob got paid. But he doesn't log in to Ishtaran to check — Mercatto's own seller dashboard shows him, using Mercatto's own credentials to ask.
export async function checkSellerBalance(ctx) {
const balance = await ctx.mercatto.ledger.getBalance(ctx.bobAccountId, ctx.assetNetworkId);
console.log(`Bob available=${balance.available} pending=${balance.pending} reserved=${balance.reserved}`);
return balance;
}
Result
{ "available": "178.380000000000000000", "pending": "0", "reserved": "0" }
Matches Bob's Settlement allocation from Settlement and Split exactly.
What happened under the hood
This isn't a simplification — it's confirmed real, live platform behavior: Bob's own
AccountHolder session cannot call Ledger at all. Every financial route (Ledger,
Transactions, Deposits, Settlement, Withdrawals) requires a Member JWT or an Application API
Key — never an AccountHolder JWT. Bob's own login, from
Seller onboarding, is scoped to identity self-service only (GET /accountholders/me, claiming further invitations). So Mercatto genuinely has to be the one
asking — exactly like a real marketplace's backend calling its payment provider on the seller's
behalf, never the seller's browser calling it directly. See
Known Limitations §F.10.