Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b075f58
fix: add missing fields
stainless-app[bot] Jan 28, 2026
2ddf823
chore: configure new SDK language
stainless-app[bot] Jan 29, 2026
2f605c1
chore: Enable stainless MCP in config
stainless-app[bot] Jan 29, 2026
c9ff6da
feat(api): Add naics_code to account holder requests/responses
stainless-app[bot] Jan 30, 2026
b327fb6
chore(internal): allow passing args to `./scripts/test`
stainless-app[bot] Jan 30, 2026
c863228
docs: Fix documentation of tokenization channel and tokenization sour…
stainless-app[bot] Feb 3, 2026
d91bef9
codegen metadata
stainless-app[bot] Feb 4, 2026
4e26f35
feat(api): add webhook signature verification
stainless-app[bot] Feb 6, 2026
71b1a8b
chore(internal): upgrade AssertJ
stainless-app[bot] Feb 6, 2026
6064b3a
feat(api): Add /v2/auth_rules/results endpoint for listing rule evalu…
stainless-app[bot] Feb 10, 2026
74dcc48
fix(api): Update /v2/auth_rules/results endpoint parameter naming and…
stainless-app[bot] Feb 10, 2026
bce1e00
fix(client): mark request body as required
stainless-app[bot] Feb 11, 2026
61d743a
feat(api): Add result schemas for Authorization and Authentication (3…
stainless-app[bot] Feb 11, 2026
0dc4d7f
codegen metadata
stainless-app[bot] Feb 12, 2026
a0a4acc
feat(api): Add PENDING_REVIEW status to KYB enrollment simulation
stainless-app[bot] Feb 12, 2026
7796bac
feat(api): Add hold token field to book transfers
stainless-app[bot] Feb 12, 2026
56b15ff
feat(api): Add network specific wallet recommendation reasons
stainless-app[bot] Feb 13, 2026
b7d7006
feat(api): Add amounts object to ASA request
stainless-app[bot] Feb 13, 2026
4b90adc
Migrate to stadardwebhooks for webhook signature verification
mirek26 Feb 17, 2026
4090241
fix format
mirek26 Feb 17, 2026
1d44ad9
chore(internal): update `TestServerExtension` comment
stainless-app[bot] Feb 17, 2026
165976c
Merge pull request #1553 from stainless-sdks/mirek_webhooks
mirek26 Feb 18, 2026
2146e4b
chore(internal): remove unnecessary base URL
stainless-app[bot] Feb 18, 2026
92d0d62
chore(internal): make `OkHttp` constructor internal
stainless-app[bot] Feb 18, 2026
41826de
feat(client): add more convenience service method overloads
stainless-app[bot] Feb 18, 2026
2b5bf16
feat(client): add connection pooling option
stainless-app[bot] Feb 18, 2026
71377d6
release: 0.117.0
stainless-app[bot] Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.116.0"
".": "0.117.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 176
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ce2adff9b644ed4562b5342a4a43d0b40c98d43b4e063b4626f4ca5d342f1b92.yml
openapi_spec_hash: fbc84b866ce96457261ac58b4e75c71d
config_hash: 31d71922d7838f34ae0875c9b8026d99
configured_endpoints: 177
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c24eebe942f400bff8922a6fbef1ce551ad14f61eb4da21b50d823a62ca42586.yml
openapi_spec_hash: b79ed927e625dedff69cea29131a34d9
config_hash: 693dddc4721eef512d75ab6c60897794
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## 0.117.0 (2026-02-18)

Full Changelog: [v0.116.0...v0.117.0](https://github.com/lithic-com/lithic-java/compare/v0.116.0...v0.117.0)

### Features

* **api:** Add /v2/auth_rules/results endpoint for listing rule evaluation data ([6064b3a](https://github.com/lithic-com/lithic-java/commit/6064b3a6c4481eeee5dd71091b9a8362134277f6))
* **api:** Add amounts object to ASA request ([b7d7006](https://github.com/lithic-com/lithic-java/commit/b7d700661fd0c506e43229c04fd12d81cef3505c))
* **api:** Add hold token field to book transfers ([7796bac](https://github.com/lithic-com/lithic-java/commit/7796bac615b7324cd9c50bc1c1b35c181d4ffce9))
* **api:** Add naics_code to account holder requests/responses ([c9ff6da](https://github.com/lithic-com/lithic-java/commit/c9ff6daa033e4022ac9208f4ff81d18346f53695))
* **api:** Add network specific wallet recommendation reasons ([56b15ff](https://github.com/lithic-com/lithic-java/commit/56b15ffec613c66071c67444273dc8ffd569bce5))
* **api:** Add PENDING_REVIEW status to KYB enrollment simulation ([a0a4acc](https://github.com/lithic-com/lithic-java/commit/a0a4acc37ebbd6a40fc6769855f87e4b2e20ce30))
* **api:** Add result schemas for Authorization and Authentication (3DS) actions ([61d743a](https://github.com/lithic-com/lithic-java/commit/61d743af0994d360aab6b9700c620809e0372bf3))
* **api:** add webhook signature verification ([4e26f35](https://github.com/lithic-com/lithic-java/commit/4e26f350ebf038f7fa0562a484a6fea5a2d85de4))
* **client:** add connection pooling option ([2b5bf16](https://github.com/lithic-com/lithic-java/commit/2b5bf16839b77bd880a73a2c4211176accc27864))
* **client:** add more convenience service method overloads ([41826de](https://github.com/lithic-com/lithic-java/commit/41826de4dac92b85774ea9dcdb754a1bb58ada93))


### Bug Fixes

* add missing fields ([b075f58](https://github.com/lithic-com/lithic-java/commit/b075f58683c40bd097d18490992744526f74161a))
* **api:** Update /v2/auth_rules/results endpoint parameter naming and action types ([74dcc48](https://github.com/lithic-com/lithic-java/commit/74dcc48075f54e964f4c8179a6121c53e6a28283))
* **client:** mark request body as required ([bce1e00](https://github.com/lithic-com/lithic-java/commit/bce1e00834c884f5b930821c7a7949fad1f38f56))


### Chores

* configure new SDK language ([2ddf823](https://github.com/lithic-com/lithic-java/commit/2ddf82360b21d85b57231fafc022f10ef909df40))
* Enable stainless MCP in config ([2f605c1](https://github.com/lithic-com/lithic-java/commit/2f605c19967c7c77dec0358e1ccbacbadf9fc632))
* **internal:** allow passing args to `./scripts/test` ([b327fb6](https://github.com/lithic-com/lithic-java/commit/b327fb6b7736803c3fd6a0806fe528aeeb96f428))
* **internal:** make `OkHttp` constructor internal ([92d0d62](https://github.com/lithic-com/lithic-java/commit/92d0d62f76d7eac438e901813dbce1fcf32c22fc))
* **internal:** remove unnecessary base URL ([2146e4b](https://github.com/lithic-com/lithic-java/commit/2146e4bb9d84df595bcc204ca589f6a0e861dff8))
* **internal:** update `TestServerExtension` comment ([1d44ad9](https://github.com/lithic-com/lithic-java/commit/1d44ad909ecfd24ab000cfcd3db3874bcf18e97e))
* **internal:** upgrade AssertJ ([71b1a8b](https://github.com/lithic-com/lithic-java/commit/71b1a8bb689d8740ddf53c0b85745d240ea83981))


### Documentation

* Fix documentation of tokenization channel and tokenization source for tokenization rules ([c863228](https://github.com/lithic-com/lithic-java/commit/c8632283a23548a67d038da60a064d70ef03d017))

## 0.116.0 (2026-01-27)

Full Changelog: [v0.115.0...v0.116.0](https://github.com/lithic-com/lithic-java/compare/v0.115.0...v0.116.0)
Expand Down
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,27 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.116.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.116.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.116.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.117.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.117.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.117.0)

<!-- x-release-please-end -->

The Lithic Java SDK provides convenient access to the [Lithic REST API](https://docs.lithic.com) from applications written in Java.

The Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions.

## MCP Server

Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

<!-- x-release-please-start-version -->

The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.116.0).
The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.117.0).

<!-- x-release-please-end -->

Expand All @@ -24,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle

```kotlin
implementation("com.lithic.api:lithic-java:0.116.0")
implementation("com.lithic.api:lithic-java:0.117.0")
```

### Maven
Expand All @@ -33,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.116.0")
<dependency>
<groupId>com.lithic.api</groupId>
<artifactId>lithic-java</artifactId>
<version>0.116.0</version>
<version>0.117.0</version>
</dependency>
```

Expand Down Expand Up @@ -491,6 +500,25 @@ LithicClient client = LithicOkHttpClient.builder()
.build();
```

### Connection pooling

To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:

```java
import com.lithic.api.client.LithicClient;
import com.lithic.api.client.okhttp.LithicOkHttpClient;
import java.time.Duration;

LithicClient client = LithicOkHttpClient.builder()
.fromEnv()
// If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.
.maxIdleConnections(10)
.keepAliveDuration(Duration.ofMinutes(2))
.build();
```

If both options are unset, OkHttp's default connection pool settings are used.

### HTTPS

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.lithic.api"
version = "0.116.0" // x-release-please-version
version = "0.117.0" // x-release-please-version
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion lithic-java-client-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

testImplementation(kotlin("test"))
testImplementation("org.assertj:assertj-core:3.25.3")
testImplementation("org.assertj:assertj-core:3.27.7")
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class LithicOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
Expand Down Expand Up @@ -77,6 +79,46 @@ class LithicOkHttpClient private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional<Proxy>) = proxy(proxy.getOrNull())

/**
* The maximum number of idle connections kept by the underlying OkHttp connection pool.
*
* If this is set, then [keepAliveDuration] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun maxIdleConnections(maxIdleConnections: Int?) = apply {
this.maxIdleConnections = maxIdleConnections
}

/**
* Alias for [Builder.maxIdleConnections].
*
* This unboxed primitive overload exists for backwards compatibility.
*/
fun maxIdleConnections(maxIdleConnections: Int) =
maxIdleConnections(maxIdleConnections as Int?)

/**
* Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
*/
fun maxIdleConnections(maxIdleConnections: Optional<Int>) =
maxIdleConnections(maxIdleConnections.getOrNull())

/**
* The keep-alive duration for idle connections in the underlying OkHttp connection pool.
*
* If this is set, then [maxIdleConnections] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
this.keepAliveDuration = keepAliveDuration
}

/** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
fun keepAliveDuration(keepAliveDuration: Optional<Duration>) =
keepAliveDuration(keepAliveDuration.getOrNull())

/**
* The socket factory used to secure HTTPS connections.
*
Expand Down Expand Up @@ -344,6 +386,8 @@ class LithicOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
.maxIdleConnections(maxIdleConnections)
.keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class LithicOkHttpClientAsync private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
Expand Down Expand Up @@ -77,6 +79,46 @@ class LithicOkHttpClientAsync private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional<Proxy>) = proxy(proxy.getOrNull())

/**
* The maximum number of idle connections kept by the underlying OkHttp connection pool.
*
* If this is set, then [keepAliveDuration] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun maxIdleConnections(maxIdleConnections: Int?) = apply {
this.maxIdleConnections = maxIdleConnections
}

/**
* Alias for [Builder.maxIdleConnections].
*
* This unboxed primitive overload exists for backwards compatibility.
*/
fun maxIdleConnections(maxIdleConnections: Int) =
maxIdleConnections(maxIdleConnections as Int?)

/**
* Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
*/
fun maxIdleConnections(maxIdleConnections: Optional<Int>) =
maxIdleConnections(maxIdleConnections.getOrNull())

/**
* The keep-alive duration for idle connections in the underlying OkHttp connection pool.
*
* If this is set, then [maxIdleConnections] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
this.keepAliveDuration = keepAliveDuration
}

/** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
fun keepAliveDuration(keepAliveDuration: Optional<Duration>) =
keepAliveDuration(keepAliveDuration.getOrNull())

/**
* The socket factory used to secure HTTPS connections.
*
Expand Down Expand Up @@ -344,6 +386,8 @@ class LithicOkHttpClientAsync private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
.maxIdleConnections(maxIdleConnections)
.keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ import java.time.Duration
import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.TimeUnit
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
import okhttp3.Call
import okhttp3.Callback
import okhttp3.ConnectionPool
import okhttp3.Dispatcher
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
Expand All @@ -33,7 +35,7 @@ import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink

class OkHttpClient
private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {

override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
val call = newCall(request, requestOptions)
Expand Down Expand Up @@ -200,6 +202,8 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien

private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var dispatcherExecutorService: ExecutorService? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
Expand All @@ -211,6 +215,28 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien

fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }

/**
* Sets the maximum number of idle connections kept by the underlying [ConnectionPool].
*
* If this is set, then [keepAliveDuration] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun maxIdleConnections(maxIdleConnections: Int?) = apply {
this.maxIdleConnections = maxIdleConnections
}

/**
* Sets the keep-alive duration for idle connections in the underlying [ConnectionPool].
*
* If this is set, then [maxIdleConnections] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
this.keepAliveDuration = keepAliveDuration
}

fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
this.dispatcherExecutorService = dispatcherExecutorService
}
Expand Down Expand Up @@ -240,6 +266,22 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
.apply {
dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) }

val maxIdleConnections = maxIdleConnections
val keepAliveDuration = keepAliveDuration
if (maxIdleConnections != null && keepAliveDuration != null) {
connectionPool(
ConnectionPool(
maxIdleConnections,
keepAliveDuration.toNanos(),
TimeUnit.NANOSECONDS,
)
)
} else {
check((maxIdleConnections != null) == (keepAliveDuration != null)) {
"Both or none of `maxIdleConnections` and `keepAliveDuration` must be set, but only one was set"
}
}

val sslSocketFactory = sslSocketFactory
val trustManager = trustManager
if (sslSocketFactory != null && trustManager != null) {
Expand Down
Loading