Account gRPC API

Overview

The Account service manages users, identity verification (Level 12), and card verification. It is the source of truth for users, identity_verifications, and card_verifications.

Internal address: account (hostname in swarm); HTTP/gRPC as configured.


Responsibilities

  • User lifecycle (create, lookup by telegram_id, profile).
  • Identity verification: Level 1 (national ID, birthdate), Level 2 (video).
  • Card verification: submit card, Card-to-IBAN (Paystar), IBAN inquiry, store verified cards.
  • Verification levels and limits used by Gateway and Payment.

Key Flows

User and verification level

flowchart TD
  A[Telegram Login] --> B[Account: Create/Get User]
  B --> C[Identity L1]
  C --> D[Identity L2]
  D --> E[Card Verification]
  E --> F[Verified User]
  F --> G[Gateway uses verification_level]

Card verification (simplified)

  • User submits card number via Gateway → Gateway calls Payment (Card-to-IBAN) → Account stores card_verifications (hash, IBAN, status).
  • Payment deposit worker matches statement traces to users via Account (FindUserByVerifiedIBAN, FindVerifiedCardByCardHash, FindVerifiedCardByLast4).

Data Model (conceptual)

  • usersid (UUID), telegram_id, verification_level, limits, KYC fields.
  • identity_verifications — Level 12, reviewed state.
  • card_verifications — card hash, IBAN, status (pending_verification, verified, rejected).

REST vs gRPC

The Gateway exposes REST for clients; it may call Account via HTTP or gRPC internally. For public API shape, see Gateway REST and Swagger.


© 2025 GitiNext - Enterprise Crypto Infrastructure | GitHub | Website