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
| Variable | Default | Required | Purpose |
|---|---|---|---|
| STRIPE_SECRET_KEY | Empty | For Stripe API calls | Creates the conditional StripeClient used by Customer, Checkout, and Refund operations |
| STRIPE_WEBHOOK_SECRET | Empty | For webhook delivery | Verifies the exact raw body and Stripe-Signature header |
| STRIPE_SUCCESS_URL | http://localhost:8080/api-test/success.html | No | Checkout success redirect |
| STRIPE_CANCEL_URL | http://localhost:8080/api-test/cancel.html | No | Checkout cancellation redirect |
| STRIPE_API_BASE | Stripe SDK default | No; test only | Overrides 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.
| Variable | Default | Required | Purpose |
|---|---|---|---|
| DB_URL | jdbc:h2:mem:transactkit;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE | No | Selects in-memory H2 or an external JDBC database such as MySQL |
| DB_USERNAME | sa | With external database | JDBC username |
| DB_PASSWORD | Empty | With external database | JDBC password |
Application and server behavior
| Setting | Default | Purpose |
|---|---|---|
| Server port | 8080 | Spring Boot server default; no product-specific override is defined |
| Stripe network retries | 2 | The conditional StripeClient enables two automatic network retries; this is not exposed as an environment override |
| SHUTDOWN_TIMEOUT | 30s | Graceful shutdown phase timeout |
| H2 console | Disabled | Avoids exposing a database console by default |
| Open EntityManager in View | Disabled | Keeps 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.
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_meProduction 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.