Skip to content
Open
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.124.0"
".": "0.125.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 191
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d29b68bb85936070878d8badaa8a7c5991313285e70a990bc812c838eba85373.yml
openapi_spec_hash: 54b44da68df22eb0ea99f2bc564667a2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a46ebb10f6bb217a591206f0574450c324f108dbd32a2d62727cd8186d85e94f.yml
openapi_spec_hash: f320c173152f74b0799166b6ef5b82cd
config_hash: ac8326134e692f3f3bdec82396bbec80
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.125.0 (2026-05-01)

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

### Features

* **api:** add AMEX to Network enum in settlement params and models ([638084a](https://github.com/lithic-com/lithic-java/commit/638084a329e3e2da55a350e950f6752e185b5ae4))
* support setting headers via env ([0493d0a](https://github.com/lithic-com/lithic-java/commit/0493d0ad4f3d8e45f35b652e670e505bcbfaf67a))


### Bug Fixes

* **types:** add EMPTY exemption type, make fields optional in Account/Card/NonPciCard ([2a2a00a](https://github.com/lithic-com/lithic-java/commit/2a2a00acc9cd3a92991a7ae50b6e02cdebaa930d))


### Documentation

* **api:** improve event_tokens and transaction_token field docs in SettlementDetail ([1ccf96d](https://github.com/lithic-com/lithic-java/commit/1ccf96d80d888a5c0756ef5a115dd3e810f9f25b))
* **api:** update exp_month/exp_year descriptions in card create/renew ([36c34a0](https://github.com/lithic-com/lithic-java/commit/36c34a04d23013e6504d322f84ed85506ab46220))

## 0.124.0 (2026-04-20)

Full Changelog: [v0.123.0...v0.124.0](https://github.com/lithic-com/lithic-java/compare/v0.123.0...v0.124.0)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- 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.124.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.124.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.124.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.125.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.125.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.125.0)

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

Expand All @@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all

<!-- 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.124.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.125.0).

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

Expand All @@ -33,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.124.0")
implementation("com.lithic.api:lithic-java:0.125.0")
```

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

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.124.0" // x-release-please-version
version = "0.125.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,14 @@ private constructor(
}
(System.getProperty("lithic.webhookSecret") ?: System.getenv("LITHIC_WEBHOOK_SECRET"))
?.let { webhookSecret(it) }
System.getenv("LITHIC_CUSTOM_HEADERS")?.let { customHeadersEnv ->
for (line in customHeadersEnv.split("\n")) {
val colon = line.indexOf(':')
if (colon >= 0) {
putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim())
}
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,10 @@ private constructor(
* * `OTHER` - The reason for the account's current status does not fall into any of the
* above categories. A comment should be provided to specify the particular reason.
*/
fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus))
fun substatus(substatus: Substatus?) = substatus(JsonField.ofNullable(substatus))

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

/**
* Sets [Builder.substatus] to an arbitrary JSON value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private constructor(
fun email(): Optional<String> = email.getOptional("email")

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder is
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder is
* not KYC-Exempt.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
Expand Down Expand Up @@ -733,10 +733,15 @@ private constructor(
fun email(email: JsonField<String>) = apply { this.email = email }

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder
* is not KYC-Exempt.
*/
fun exemptionType(exemptionType: ExemptionType) = exemptionType(JsonField.of(exemptionType))
fun exemptionType(exemptionType: ExemptionType?) =
exemptionType(JsonField.ofNullable(exemptionType))

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

/**
* Sets [Builder.exemptionType] to an arbitrary JSON value.
Expand Down Expand Up @@ -1871,7 +1876,7 @@ private constructor(
}

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder is
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder is
* not KYC-Exempt.
*/
class ExemptionType @JsonCreator private constructor(private val value: JsonField<String>) :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ private constructor(
fun email(): Optional<String> = email.getOptional("email")

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder
* is not KYC-Exempt.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
Expand Down Expand Up @@ -927,7 +927,7 @@ private constructor(
fun email(email: JsonField<String>) = apply { this.email = email }

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account
* holder is not KYC-Exempt.
*/
fun exemptionType(exemptionType: ExemptionType) =
Expand Down Expand Up @@ -2098,7 +2098,7 @@ private constructor(
}

/**
* The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder
* The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder
* is not KYC-Exempt.
*/
class ExemptionType @JsonCreator private constructor(private val value: JsonField<String>) :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ private constructor(
* * `OTHER` - The reason for the account's current status does not fall into any of the
* above categories. A comment should be provided to specify the particular reason.
*/
fun substatus(substatus: Substatus) = apply { body.substatus(substatus) }
fun substatus(substatus: Substatus?) = apply { body.substatus(substatus) }

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

/**
* Sets [Builder.substatus] to an arbitrary JSON value.
Expand Down Expand Up @@ -864,7 +867,10 @@ private constructor(
* * `OTHER` - The reason for the account's current status does not fall into any of the
* above categories. A comment should be provided to specify the particular reason.
*/
fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus))
fun substatus(substatus: Substatus?) = substatus(JsonField.ofNullable(substatus))

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

/**
* Sets [Builder.substatus] to an arbitrary JSON value.
Expand Down
37 changes: 26 additions & 11 deletions lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ private constructor(
fun created(): OffsetDateTime = created.getRequired("created")

/**
* Deprecated: Funding account for the card.
* Funding account for a card
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun funding(): NonPciCard.FundingAccount = funding.getRequired("funding")
fun funding(): Optional<NonPciCard.FundingAccount> = funding.getOptional("funding")

/**
* Last four digits of the card number.
Expand Down Expand Up @@ -822,8 +822,11 @@ private constructor(
*/
fun created(created: JsonField<OffsetDateTime>) = apply { this.created = created }

/** Deprecated: Funding account for the card. */
fun funding(funding: NonPciCard.FundingAccount) = funding(JsonField.of(funding))
/** Funding account for a card */
fun funding(funding: NonPciCard.FundingAccount?) = funding(JsonField.ofNullable(funding))

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

/**
* Sets [Builder.funding] to an arbitrary JSON value.
Expand Down Expand Up @@ -1040,8 +1043,14 @@ private constructor(
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
* use.
*/
fun digitalCardArtToken(digitalCardArtToken: String) =
digitalCardArtToken(JsonField.of(digitalCardArtToken))
fun digitalCardArtToken(digitalCardArtToken: String?) =
digitalCardArtToken(JsonField.ofNullable(digitalCardArtToken))

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

/**
* Sets [Builder.digitalCardArtToken] to an arbitrary JSON value.
Expand Down Expand Up @@ -1159,7 +1168,10 @@ private constructor(
* use. Specifies the configuration (i.e., physical card art) that the card should be
* manufactured with.
*/
fun productId(productId: String) = productId(JsonField.of(productId))
fun productId(productId: String?) = productId(JsonField.ofNullable(productId))

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

/**
* Sets [Builder.productId] to an arbitrary JSON value.
Expand Down Expand Up @@ -1212,7 +1224,10 @@ private constructor(
* has been returned. * `OTHER` - The reason for the status does not fall into any of the
* above categories. A comment can be provided to specify the reason.
*/
fun substatus(substatus: NonPciCard.Substatus) = substatus(JsonField.of(substatus))
fun substatus(substatus: NonPciCard.Substatus?) = substatus(JsonField.ofNullable(substatus))

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

/**
* Sets [Builder.substatus] to an arbitrary JSON value.
Expand Down Expand Up @@ -1336,7 +1351,7 @@ private constructor(
accountToken()
cardProgramToken()
created()
funding().validate()
funding().ifPresent { it.validate() }
lastFour()
pinStatus().validate()
spendLimit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private constructor(

/**
* Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration
* date will be generated.
* date five years in the future will be generated. Five years is the maximum expiration date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand All @@ -115,7 +115,8 @@ private constructor(

/**
* Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand Down Expand Up @@ -591,7 +592,8 @@ private constructor(

/**
* Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*/
fun expMonth(expMonth: String) = apply { body.expMonth(expMonth) }

Expand All @@ -605,7 +607,8 @@ private constructor(

/**
* Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*/
fun expYear(expYear: String) = apply { body.expYear(expYear) }

Expand Down Expand Up @@ -1181,7 +1184,8 @@ private constructor(

/**
* Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand All @@ -1190,7 +1194,8 @@ private constructor(

/**
* Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
Expand Down Expand Up @@ -1721,7 +1726,8 @@ private constructor(

/**
* Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*/
fun expMonth(expMonth: String) = expMonth(JsonField.of(expMonth))

Expand All @@ -1736,7 +1742,8 @@ private constructor(

/**
* Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an
* expiration date will be generated.
* expiration date five years in the future will be generated. Five years is the maximum
* expiration date.
*/
fun expYear(expYear: String) = expYear(JsonField.of(expYear))

Expand Down
Loading
Loading