Skip to main content

Spring Boot demo

Build a Spring MVC invoice portal with embedded, modal, and hosted Checkout. The Java SDK creates the order on the server.

What you’ll build

  • Spring Boot 4 with Spring MVC, validation, and Thymeleaf
  • Builder-based order creation with the Inttegro Java SDK
  • Server-held credentials, idempotency, and safe errors
  • Thymeleaf views progressively enhanced with @inttegro/js

See the flow

The gallery shows one server-created order in each Checkout presentation. The Java SDK, API key, invoice, and amount remain on the server.

Select any image to view it full screen.

Run the demo

Install Java 17 and Maven. Until Java SDK 5.0.0 reaches Maven Central, install it from this Commerce checkout first. The released README has the exact commands.

Key files

  1. CheckoutService.java creates the order and maps safe errors.
  2. CheckoutController.java handles validation and the JSON or 303 response.
  3. checkout-presentations.js presents Checkout in all three modes.

Before you ship

Store the invoice and Inttegro order IDs together. Verify payment before marking the invoice paid or releasing services.

Next