Skip to content
Open

EI #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
eb73869
Fix type bounds on request (#2037)
mbroshi-stripe Sep 4, 2025
4c35bc3
generate w/ v2 openapi spec (#2039)
xavdid-stripe Sep 8, 2025
f1f0488
Reapply "Updated stripeclient snippets in Readme.md (#2014)" (#2015) …
prathmesh-stripe Sep 17, 2025
ea0da3a
fix: clarify exception message when API key is null (#2041)
elnafateh Sep 18, 2025
44487bf
Update generated code (#2040)
stripe-openapi[bot] Sep 23, 2025
997cefa
Adds v2 support to RateLimitException (#781) (#2046)
helenye-stripe Sep 23, 2025
734cd28
Update generated code for v2023 and 2025-09-30.clover (#2051)
stripe-openapi[bot] Sep 24, 2025
ccf0670
Update generated code for v2023 and 2025-09-30.clover (#2054)
stripe-openapi[bot] Sep 24, 2025
79b31f5
⚠️ Add strongly typed EventNotifications (#2036)
xavdid-stripe Sep 25, 2025
2810582
Update generated code for v2025 and 2025-09-30.clover (#2058)
stripe-openapi[bot] Sep 25, 2025
babe753
Update generated code for v2025 and 2025-09-30.clover (#2059)
stripe-openapi[bot] Sep 25, 2025
c8dc171
Add `StripeContext` object (#2057)
xavdid-stripe Sep 26, 2025
4e5e72a
Fix version script and update to 29.5.0 (#2064)
helenye-stripe Sep 26, 2025
1d0c0b1
updated generated and manually maintained code to move v2.Event, v2.…
xavdid-stripe Sep 29, 2025
98702eb
Clarify what versions of java we support (no change) (#2070)
xavdid-stripe Sep 29, 2025
d417a16
Update generated code (#2063)
stripe-openapi[bot] Sep 29, 2025
9bce680
Update generated code for v2028 and 2025-09-30.clover (#2073)
stripe-openapi[bot] Sep 29, 2025
922d825
Bump version to 30.0.0
ramya-stripe Sep 30, 2025
bf925ff
Remove manual promotion code test (#2078)
jar-stripe Oct 1, 2025
90e5bd9
Improve event notification example (#2082)
xavdid-stripe Oct 6, 2025
b34c9ba
Update generated code (#2086)
stripe-openapi[bot] Oct 27, 2025
017ed48
Update generated code for v2102 and (#2093)
stripe-openapi[bot] Oct 28, 2025
0ee2d5e
bumped the max heap size to 4gb (#2094)
jar-stripe Oct 28, 2025
13c84a3
Bump version to 30.1.0
ramya-stripe Oct 29, 2025
4a3ea81
Update CHANGELOG.md to include note on pinned API version (#2096)
ramya-stripe Oct 30, 2025
da6145b
Update generated code (#2102)
stripe-openapi[bot] Nov 5, 2025
6cf9067
Bump version to 30.2.0
ramya-stripe Nov 5, 2025
6f25215
Add min version for custom request support (#2109)
ramya-stripe Nov 10, 2025
0931ee3
Update generated code (#2108)
stripe-openapi[bot] Nov 15, 2025
db05641
Update generated code (#2113)
stripe-openapi[bot] Nov 17, 2025
6a30e75
Update v2 array parameter serialization to use indexed format (#2110)
mbroshi-stripe Nov 17, 2025
bcd7d13
Bump version to 31.0.0
ramya-stripe Nov 18, 2025
0427ec8
Update CHANGELOG.md to remove changes on Events (#2116)
ramya-stripe Nov 18, 2025
7a86510
Add Automatic-Module-Name to manifest entry (#2121)
mbroshi-stripe Dec 2, 2025
ddc5736
Add Gson version to Stripe header (#2124)
mbroshi-stripe Dec 6, 2025
099ffc3
Update generated code (#2126)
stripe-openapi[bot] Dec 15, 2025
2fb0bb3
Bump version to 31.1.0
ramya-stripe Dec 16, 2025
11b30cd
Copy API_VERSION to CODEGEN_VERSION (#2132)
ramya-stripe Jan 2, 2026
31c4551
Delete API_VERSION file as it is no longer needed (#2136)
ramya-stripe Jan 6, 2026
c5d0f0f
Add explicit permissions to GitHub workflows (#2140)
mbroshi-stripe Jan 12, 2026
5fad1d2
Update generated code (#2144)
stripe-openapi[bot] Jan 16, 2026
1afcc9c
Bump version to 31.2.0
mbroshi-stripe Jan 16, 2026
0365b60
Update generated code (#2147)
stripe-openapi[bot] Jan 28, 2026
a07786f
Bump version to 31.3.0
ramya-stripe Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ on:
- sdk-release/**
- feature/**

permissions: {}

jobs:
build:
name: Build

runs-on: "ubuntu-24.04"

permissions:
contents: read

steps:
- uses: extractions/setup-just@v2
- uses: actions/checkout@master
Expand All @@ -49,19 +54,25 @@ jobs:

runs-on: "ubuntu-24.04"

permissions:
contents: read

strategy:
fail-fast: false
matrix:
# We test Stripe SDK against Java LTS versions(8, 11, 17, 21) and currently supported non-LTS versions.
# https://www.oracle.com/java/technologies/java-se-support-roadmap.html
# https://endoflife.date/oracle-jdk
java-version:
# LTS versions
- "1.8"
- "11"
- "17"
- "21"
- "22"
- "23"
- "24"
- "25"
# non-LTS versions
# we should periodically add the latest non-LTS version here to test against
# as of 2025-09-29, the latest version of java (25) is LTS, so this section is empty. In March 2026, we'll add "26".

steps:
- uses: extractions/setup-just@v2
Expand Down Expand Up @@ -103,6 +114,8 @@ jobs:
endsWith(github.actor, '-stripe')
needs: [build, test]
runs-on: "ubuntu-24.04"
permissions:
contents: read
steps:
- uses: actions/checkout@master
- name: Setup Java
Expand Down Expand Up @@ -166,6 +179,9 @@ jobs:
compat:
runs-on: "ubuntu-24.04"

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
types:
- auto_merge_enabled

permissions: {}

jobs:
require_merge_commit_on_merge_script_pr:
name: Merge script PRs must create merge commits
Expand Down
1 change: 0 additions & 1 deletion API_VERSION

This file was deleted.

207 changes: 207 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fdbf5e05015131c7993d2b4017103f0d94561b6a
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
update-version:
@echo "$(VERSION)" > VERSION
@perl -pi -e 's|badge/maven--central-v[.\d\-\w]+-blue|badge/maven--central-v$(VERSION)-blue|' README.md
@perl -pi -e 's|https:\/\/search\.maven\.org\/remotecontent\?filepath=com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/$(VERSION)/stripe-java-$(VERSION).jar|' README.md
@perl -pi -e 's|https:\/\/repo1\.maven\.org\/maven2\/com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://repo1.maven.org/maven2/com/stripe/stripe-java/$(VERSION)/stripe-java-$(VERSION).jar|' README.md
@perl -pi -e 's|Current release version: [.\d\-\w]+|Current release version: $(VERSION)|' README.md
@perl -pi -e 's|implementation "com\.stripe:stripe-java:[.\d\-\w]+"|implementation "com.stripe:stripe-java:$(VERSION)"|' README.md
@perl -pi -e 's|<version>[.\d\-\w]+<\/version>|<version>$(VERSION)</version>|' README.md
@perl -pi -e 's|VERSION_NAME=[.\d\-\w]+|VERSION_NAME=$(VERSION)|' gradle.properties
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1932
v2160
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stripe Java client library

[![Maven Central](https://img.shields.io/badge/maven--central-v29.5.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![Maven Central](https://img.shields.io/badge/maven--central-v31.3.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java)
[![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster)

Expand All @@ -10,14 +10,20 @@ The official [Stripe][stripe] Java client library.

### Requirements

- Java 1.8 or later
We support LTS versions of the JDK. Currently, that's Java versions:

- 8 (1.8)
- 11
- 17
- 21
- 25

### Gradle users

Add this dependency to your project's build file:

```groovy
implementation "com.stripe:stripe-java:29.5.0"
implementation "com.stripe:stripe-java:31.3.0"
```

### Maven users
Expand All @@ -28,7 +34,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>29.5.0</version>
<version>31.3.0</version>
</dependency>
```

Expand All @@ -37,8 +43,8 @@ Add this dependency to your project's POM:
If you are not using Gradle or Maven, you will need to manually install the following JARs:

1. The Stripe JAR:
- Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/29.0.0/stripe-java-29.0.0.jar)
- Current release version: 29.0.0
- Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.3.0/stripe-java-31.3.0.jar)
- Current release version: 31.3.0

2. Google Gson:
- The Stripe JAR builds and tests with Gson version 2.10.1
Expand Down Expand Up @@ -93,7 +99,7 @@ public class StripeExample {
.build();

try {
Customer customer = client.customers().create(params);
Customer customer = client.v1().customers().create(params);
System.out.println(customer);
} catch (StripeException e) {
e.printStackTrace();
Expand All @@ -112,7 +118,7 @@ Once the legacy pattern is deprecated, new API endpoints will only be accessible

### Per-request Configuration

All of the request methods accept an optional `RequestOptions` object. This is
All the request methods accept an optional `RequestOptions` object. This is
used if you want to set an [idempotency key][idempotency-keys], if you are
using [Stripe Connect][connect-auth], or if you want to pass the secret API
key on each method.
Expand All @@ -124,9 +130,9 @@ RequestOptions requestOptions = RequestOptions.builder()
.setStripeAccount("acct_...")
.build();

client.customers().list(requestOptions);
client.v1().customers().list(requestOptions);

client.customers().retrieve("cus_123456789", requestOptions);
client.v1().customers().retrieve("cus_123456789", requestOptions);
```

### Configuring automatic retries
Expand All @@ -147,7 +153,7 @@ Or on a finer grain level using `RequestOptions`:
RequestOptions options = RequestOptions.builder()
.setMaxNetworkRetries(2)
.build();
client.customers().create(params, options);
client.v1().customers().create(params, options);
```

[Idempotency keys][idempotency-keys] are added to requests to guarantee that
Expand All @@ -171,7 +177,7 @@ RequestOptions options = RequestOptions.builder()
.setConnectTimeout(30 * 1000) // in milliseconds
.setReadTimeout(80 * 1000)
.build();
client.customers().create(params, options);
client.v1().customers().create(params, options);
```

Please take care to set conservative read timeouts. Some API requests can take
Expand Down Expand Up @@ -207,15 +213,15 @@ CustomerCreateParams params =
.putExtraParam("secret_parameter[secondary]", "secondary value")
.build();

client.customers().create(params);
client.v1().customers().create(params);
```

#### Properties

To retrieve undocumented properties from Stripe using Java you can use an option in the library to return the raw JSON object and return the property as a native type. An example of this is shown below:

```java
final Customer customer = client.customers().retrieve("cus_1234");
final Customer customer = client.v1().customers().retrieve("cus_1234");
Boolean featureEnabled =
customer.getRawJsonObject()
.getAsJsonPrimitive("secret_feature_enabled")
Expand Down Expand Up @@ -276,6 +282,8 @@ Stripe has features in the [private preview phase](https://docs.stripe.com/relea

### Custom requests

> This feature is only available from version 27 of this SDK.

If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on `StripeClient`.

```java
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29.5.0
31.3.0
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tasks.withType(JavaCompile) {
}

options.fork = true
options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx1g']
options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx4g']

options.release = project.targetCompatibility.majorVersion as Integer

Expand Down Expand Up @@ -99,7 +99,8 @@ jar {
"Implementation-Version": VERSION_NAME,
"Implementation-Vendor": VENDOR_NAME,
"Bundle-SymbolicName": POM_ARTIFACT_ID,
"Export-Package": "com.stripe.*")
"Export-Package": "com.stripe.*",
"Automatic-Module-Name": "stripe.java")

archiveVersion = VERSION_NAME
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.stripe
VERSION_NAME=29.5.0
VERSION_NAME=31.3.0

POM_URL=https://github.com/stripe/stripe-java
POM_SCM_URL=git@github.com:stripe/stripe-java.git
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ format-check:
update-version version:
echo "{{ version }}" > VERSION
perl -pi -e 's|badge/maven--central-v[.\d\-\w]+-blue|badge/maven--central-v{{ version }}-blue|' README.md
perl -pi -e 's|https:\/\/search\.maven\.org\/remotecontent\?filepath=com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/{{ version }}/stripe-java-{{ version }}.jar|' README.md
perl -pi -e 's|https:\/\/repo1\.maven\.org\/maven2\/com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://repo1.maven.org/maven2/com/stripe/stripe-java/{{ version }}/stripe-java-{{ version }}.jar|' README.md
perl -pi -e 's|Current release version: [.\d\-\w]+|Current release version: {{ version }}|' README.md
perl -pi -e 's|implementation "com\.stripe:stripe-java:[.\d\-\w]+"|implementation "com.stripe:stripe-java:{{ version }}"|' README.md
perl -pi -e 's|<version>[.\d\-\w]+<\/version>|<version>{{ version }}</version>|' README.md
perl -pi -e 's|VERSION_NAME=[.\d\-\w]+|VERSION_NAME={{ version }}|' gradle.properties
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
package com.stripe;

final class ApiVersion {
public static final String CURRENT = "2025-08-27.basil";
public static final String CURRENT_MAJOR = "basil";
public static final String CURRENT = "2026-01-28.clover";
public static final String CURRENT_MAJOR = "clover";
}
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/Stripe.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class Stripe {
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com";
public static final String VERSION = "29.5.0";
public static final String VERSION = "31.3.0";

public static volatile String apiKey;
public static volatile String clientId;
Expand Down
Loading