Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
branches:
- master
- beta
- private-preview
- sdk-release/**
- feature/**

Expand Down
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-08-27.preview
2025-09-30.preview
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,36 @@ This release changes the pinned API version to `2025-08-27.preview`.
* Add support for new values `ao_nif`, `az_tin`, `bd_etin`, `cr_cpj`, `cr_nite`, `do_rcn`, `gt_nit`, `kz_bin`, `mz_nuit`, `pe_ruc`, `pk_ntn`, `sa_crn`, and `sa_tin` on enums `v2.core.AccountCreateParams.identity.business_details.id_numbers[].type` and `v2.core.AccountUpdateParams.identity.business_details.id_numbers[].type`
* Add support for new values `ao_nif`, `az_tin`, `bd_brc`, `bd_etin`, `bd_nid`, `cr_cpf`, `cr_dimex`, `cr_nite`, `do_rcn`, `gt_nit`, `kz_iin`, `mz_nuit`, `pe_dni`, `pk_cnic`, `pk_snic`, and `sa_tin` on enums `v2.core.AccountCreateParams.identity.individual.id_numbers[].type`, `v2.core.AccountUpdateParams.identity.individual.id_numbers[].type`, `v2.core.PersonCreateParams.id_numbers[].type`, and `v2.core.PersonUpdateParams.id_numbers[].type`

## 29.5.0 - 2025-08-27
* [#2034](https://github.com/stripe/stripe-java/pull/2034) Add section on private preview SDKs in readme
* [#2030](https://github.com/stripe/stripe-java/pull/2030) Update generated code. This release changes the pinned API version to `2025-08-27.basil`.
* Add support for `balanceReport`, `payoutDetails`, and `payoutReconciliationReport` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Add support for `name` on `billingportal.ConfigurationCreateParams`, `billingportal.ConfigurationUpdateParams`, and `billingportal.Configuration`
* Add support for `installments` on `Charge.payment_method_details.alma`
* Add support for `transactionId` on `Charge.payment_method_details.alma`, `Charge.payment_method_details.amazon_pay`, `Charge.payment_method_details.billie`, `Charge.payment_method_details.kakao_pay`, `Charge.payment_method_details.kr_card`, `Charge.payment_method_details.naver_pay`, `Charge.payment_method_details.payco`, `Charge.payment_method_details.revolut_pay`, `Charge.payment_method_details.samsung_pay`, and `Charge.payment_method_details.satispay`
* Add support for `location` and `reader` on `Charge.payment_method_details.paynow`
* Add support for `amountIncludesIof` on `PaymentIntent.payment_method_options.pix`, `PaymentIntentConfirmParams.payment_method_options.pix`, `PaymentIntentCreateParams.payment_method_options.pix`, `PaymentIntentUpdateParams.payment_method_options.pix`, `checkout.Session.payment_method_options.pix`, and `checkout.SessionCreateParams.payment_method_options.pix`
* Add support for new value `terminal_android_apk` on enum `FileListParams.purpose`
* Add support for new value `terminal_android_apk` on enum `FileCreateParams.purpose`
* Add support for `metadata` and `period` on `InvoiceCreatePreviewParams.schedule_details.phases[].add_invoice_items[]`, `SubscriptionCreateParams.add_invoice_items[]`, `SubscriptionSchedule.phases[].add_invoice_items[]`, `SubscriptionScheduleCreateParams.phases[].add_invoice_items[]`, `SubscriptionScheduleUpdateParams.phases[].add_invoice_items[]`, and `SubscriptionUpdateParams.add_invoice_items[]`
* Add support for `expMonth` and `expYear` on `issuing.CardCreateParams`
* Add support for `excludedPaymentMethodTypes` on `PaymentIntentCreateParams` and `PaymentIntent`
* Add support for `payoutMethod` on `PayoutCreateParams` and `Payout`
* Add support for `mxn` on `terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping`
* Add support for `card` on `terminal.ReaderPresentPaymentMethodParams`
* Add support for new value `card` on enum `terminal.ReaderPresentPaymentMethodParams.type`
* Add support for new value `2025-08-27.basil` on enum `WebhookEndpointCreateParams.apiVersion`
* [#2032](https://github.com/stripe/stripe-java/pull/2032) Introduce V1 namespaces in StripeClient
- All the top level non-namespaced services under StripeClient services(eg. customers, products) are copied under the new V1 namespace. These top level non-namespaced services will be marked as deprecated in the next major release and will be removed in a future release. Eg.
```diff
StripeClient client = new StripeClient("sk_test...")

# Accessing V1 Stripe services on a StripeClient should be through the V1 namespace
- client.customers().list()
+ client.v1().customers().list()
```
Refer to the [migration guide](https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient) for help upgrading.

## 29.5.0-beta.2 - 2025-08-08
* [#2031](https://github.com/stripe/stripe-java/pull/2031) Bring back invoice payments APIs that were missing in the public preview SDKs
* Add support for new resource `InvoicePayment`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1932
v2022
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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 @@ -102,7 +102,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 @@ -114,9 +114,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 @@ -137,7 +137,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 @@ -161,7 +161,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 @@ -197,15 +197,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 @@ -250,7 +250,7 @@ Stripe.enableTelemetry = false;
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `25.2.0-beta.2`.
We would love for you to try these as we incrementally release new features and improve them based on your feedback.

To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-java/releases/) and then use it [installation steps above](#installation).
To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-java/releases/) and then use it [installation steps above](#installation).

> **Note**
> There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest public preview SDK.
Expand All @@ -260,6 +260,9 @@ Some preview features require a name and version to be set in the `Stripe-Versio
```java
Stripe.addBetaVersion("feature_beta", "v3");
```
### Private Preview SDKs

Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `25.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-java?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.

### Custom requests

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
package com.stripe;

final class ApiVersion {
public static final String CURRENT = "2025-08-27.preview";
public static final String CURRENT = "2025-09-30.preview";
}
Loading
Loading