Skip to content

Wallets & identity

Get user profile & balance

Fetch a user's on-chain nTZS balance alongside their profile. The balance is read live from Base mainnet at request time.

balanceTzs: live nTZS balance read from the nTZS contract on Base mainnet. Increases on deposit, decreases on withdrawal or nTZS→USDC swap.
balanceUsdc: live USDC balance in the same wallet. Accumulates when the user swaps nTZS→USDC. Both balances are fetched in parallel in a single API call.
Both fields are read directly from Base mainnet at request time, with no caching. Always use this endpoint before initiating a transfer or withdrawal to confirm the user has sufficient funds.
GET /api/v1/users/:id
const res = await fetch(
  'https://www.ntzs.co.tz/api/v1/users/14e17d04-ec7f-4d99-91a3-dfbaca19fba1',
  { headers: { 'Authorization': 'Bearer ntzs_live_xxxxxxxxxxxx' } }
)
const user = await res.json()
// {
//   id: "14e17d04-ec7f-4d99-91a3-dfbaca19fba1",
//   externalId: "your-internal-user-id",
//   email: "user@example.com",
//   phone: "255712345678",
//   kycStatus: "approved",  // approved | pending_review | rejected | none
//   walletAddress: "0x531B87EfdEBD19bfd05700DF6218d4786Cf2201C",
//   balanceTzs: 25000,   // nTZS balance (18 decimals, integer TZS units)
//   balanceUsdc: 6.50    // USDC balance (6 decimals, float)
// }