backend
designDoc
global
Wallet, Account & Virtual Account
Overview
The Wallet Service is a Java-based microservice designed to manage wallets, transactions, payouts, and virtual accounts. It is built using Spring Boot and follows a modular architecture to ensure scalability and maintainability.
Features
Feature
Description
π Wallet Management
Create, update, and retrieve wallet details.
π³ Transaction Management
Handle user transactions with support for pagination and filtering.
πΈ Payouts
Initiate and manage payouts.
π¦ Virtual Accounts
Manage virtual accounts for users.
π OpenAPI Documentation
Integrated API documentation using SpringDoc OpenAPI.
π Observability
Includes logging and tracing with Loki and OpenTelemetry.
Technologies Used
Technology
Purpose
β Java 17
Programming language
π± Spring Boot 3.2.4
Framework for building microservices
π PostgreSQL
Database
π οΈ Flyway
Database migrations
βοΈ Lombok
Reducing boilerplate code
π MapStruct
Object mapping
π‘οΈ Resilience4j
Fault tolerance
π OpenAPI
API documentation
π Micrometer
Observability
Getting Started
Prerequisites
β Java 17 or higher
π PostgreSQL database
π οΈ Gradle build tool
Setup Instructions
Clone the repository:
git clone https://github.com/Olanna-tech/wallet-service-java.git
cd wallet-service-java
Configure the database in src/main/resources/application.yml:
spring :
datasource :
url : jdbc:postgresql://<DB_HOST>:<DB_PORT>/<DB_NAME>
username : <DB_USERNAME>
password : <DB_PASSWORD>
Build the project:
Run the application:
Running Tests
To execute the test suite, run:
API Endpoints
Wallets
Endpoint
Method
Description
/api/v1/wallets
POST
β Create a new wallet
/api/v1/wallets/{walletId}
GET
π Retrieve wallet details
/api/v1/wallets/{userId}/user
GET
π Retrieve wallets for a user
/api/v1/wallets/{walletId}/status
PATCH
βοΈ Update wallet status
/api/v1/wallets/{walletId}/balance
GET
π° Retrieve wallet balance
Payouts
Endpoint
Method
Description
/api/v1/payouts
POST
β Initiate a payout
/api/v1/payouts/{payoutId}
GET
π Retrieve payout details
/api/v1/payouts
GET
π Retrieve all payouts
/api/v1/payouts/{payoutId}/status
PATCH
βοΈ Update payout status
Transactions
Endpoint
Method
Description
/api/v1/transactions
POST
β Create a transaction
/api/v1/transactions/{transactionId}
GET
π Retrieve transaction details
/api/v1/transactions
GET
π Retrieve all transactions
Virtual Accounts
Endpoint
Method
Description
/api/v1/virtual-accounts
POST
β Create a virtual account
/api/v1/virtual-accounts/{accountId}
GET
π Retrieve virtual account details
Observability
Feature
Description
π Logging
Configured with Loki for centralized logging.
π‘ Tracing
Integrated with OpenTelemetry for distributed tracing.
License
This project is licensed under the π Apache 2.0 License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
For inquiries, please contact π§ support@Olanna-tech.com .
January 16, 2026
January 16, 2026