09 / 24Next →
Academic payment service2023

Stripe Payment Gateway Microservice

A Java 17 and Spring Boot 3 service that isolates payment processing behind a REST interface: Stripe tokenization and charges, MySQL transaction records and OpenAPI documentation.

ContextNIBM
Year2023
TypeBackend
StatusCompleted
RoleBackend development

Project media coming soon

Screenshots and demo videos for this case study will appear here.

Overview

The project moves payment responsibilities into a small, single-purpose Spring service. It creates Stripe card tokens, submits charges, records each result in MySQL and exposes payment history and per-project payment totals.

JavaSpring BootStripeMySQLSpring Data JPAOpenAPI
Challenge

The goal was to learn how an external payment provider, service-layer business logic and local transaction records fit together, without coupling payment code to a larger application.

Approach

I structured the code as controllers, DTOs, services, JPA entities and repositories. The Stripe Java SDK handles token and charge calls, Spring Data JPA persists results, and Springdoc publishes the REST contract through Swagger UI.

Outcome

The prototype gave me practical experience with third-party payment APIs, layered design and persistence. It is an academic implementation, not a production payment processor.

Engineering decisions
01

Keep the provider at the edge

Stripe calls live in a dedicated StripeService, while PaymentService owns business logic and persistence. Controllers only translate DTOs, so changing payment provider would touch one class.

02

Record every outcome locally

Each charge result, successful or not, is stored as a Payment entity. History and per-project totals are answered from MySQL, not by querying Stripe on each request.

What I built
01Stripe card-token and charge flows
02Layered controller, DTO, service, repository and entity structure
03MySQL transaction records and per-project payment totals
04Springdoc OpenAPI and Swagger UI for exploring the endpoints
Next projectMessaging App →