Skip to main content

Customer Service

Purpose

Customer lifecycle management including profiles, KYC status, and contact information.

Responsibilities

  • Customer CRUD
  • KYC status tracking
  • Address and contact management
  • Customer search
  • Publish customer events

Non-Responsibilities

  • Authentication (Auth Service)
  • Account creation (Account Service)
  • Payment processing

APIs

MethodEndpointAuthDescription
POST/api/v1/customersADMINCreate customer
GET/api/v1/customers/{id}BearerGet customer
PUT/api/v1/customers/{id}BearerUpdate customer
GET/api/v1/customers/{id}/kycRISK_ANALYSTKYC status
PUT/api/v1/customers/{id}/kycRISK_ANALYSTUpdate KYC

Database

TableKey ColumnsDescription
customersid, user_id, first_name, last_name, email, statusCustomer profiles
addressesid, customer_id, type, line1, city, countryAddresses
kyc_recordsid, customer_id, status, verified_at, documentsKYC data

Kafka

Produces: CustomerCreated, CustomerUpdated, KycStatusChanged Consumes: None

Dependencies

Sync: Auth Service Async: Publishes customer events

Failure Handling

  • Duplicate email → 409 Conflict
  • KYC rejection → status update + notification

Scaling

Read-heavy. Use read replicas. Cache customer profiles in Redis.

Security

Customers access own data only. ADMIN/RISK_ANALYST for KYC operations.

Observability

Metrics: customer_created_total, kyc_status_changes. Logs: PII masked.