Documentation menu

TransactKit-Litev1.0.0

TransactKit-Lite configuration

Configure TransactKit-Lite Stripe credentials, Checkout redirects, H2 or MySQL persistence, shutdown behavior, and stripe-mock routing.

Updated

Configuration model

application.properties supplies runnable local defaults and optionally imports a root .env file. Copy .env.example only when development needs Stripe, MySQL, different Checkout redirects, a mock API base, or a shutdown override.

Stripe and Checkout variables

Stripe environment variables
VariableDefaultRequiredPurpose
STRIPE_SECRET_KEYEmptyFor Stripe API callsCreates the conditional StripeClient used by Customer, Checkout, and Refund operations
STRIPE_WEBHOOK_SECRETEmptyFor webhook deliveryVerifies the exact raw body and Stripe-Signature header
STRIPE_SUCCESS_URLhttp://localhost:8080/api-test/success.htmlNoCheckout success redirect
STRIPE_CANCEL_URLhttp://localhost:8080/api-test/cancel.htmlNoCheckout cancellation redirect
STRIPE_API_BASEStripe SDK defaultNo; test onlyOverrides the per-client API base for local stripe-mock contract tests

Database variables

Flyway owns schema creation. Hibernate uses ddl-auto=validate, so it checks the migrated schema rather than creating or updating tables. H2's DB_CLOSE_DELAY=-1 keeps data for the life of the running process, but the database resets on application restart.

Database environment variables
VariableDefaultRequiredPurpose
DB_URLjdbc:h2:mem:transactkit;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSENoSelects in-memory H2 or an external JDBC database such as MySQL
DB_USERNAMEsaWith external databaseJDBC username
DB_PASSWORDEmptyWith external databaseJDBC password

Application and server behavior

Application settings
SettingDefaultPurpose
Server port8080Spring Boot server default; no product-specific override is defined
Stripe network retries2The conditional StripeClient enables two automatic network retries; this is not exposed as an environment override
SHUTDOWN_TIMEOUT30sGraceful shutdown phase timeout
H2 consoleDisabledAvoids exposing a database console by default
Open EntityManager in ViewDisabledKeeps persistence access inside service transactions

Development overrides

  • Use Stripe test-mode credentials during development.
  • Restart the application after changing .env.
  • Keep Checkout redirect URLs aligned with the browser origin you actually use.
  • Use DB_URL, DB_USERNAME, and DB_PASSWORD together when selecting MySQL.
.env
STRIPE_SECRET_KEY=sk_test_replace_me
STRIPE_WEBHOOK_SECRET=whsec_replace_me

DB_URL=jdbc:mysql://localhost:3306/transactkit_lite
DB_USERNAME=transactkit
DB_PASSWORD=replace_me

Production requirements

  • Store Stripe and database credentials in managed secret configuration, not files committed to Git.
  • Use HTTPS for application traffic and the public Stripe webhook endpoint.
  • Use durable MySQL storage, restricted database credentials, tested Flyway migrations, and backups.
  • Set production success and cancel URLs owned by the host application.
  • Leave STRIPE_API_BASE unset.
  • Register the webhook endpoint with Stripe's pinned API version 2026-08-26.dahlia.
  • Add host authentication, authorization, resource ownership, refund policy, rate limiting, logging controls, monitoring, and reconciliation.