Skip to content
Open
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
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,58 @@ This release changes the pinned API version to `2026-03-25.preview`. It is built
* [#2189](https://github.com/stripe/stripe-java/pull/2189) Merge to beta
* [#2175](https://github.com/stripe/stripe-java/pull/2175) Merge to beta

## 32.0.0 - 2026-03-25

This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v32) to simplify your upgrade process.

Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/dahlia) before upgrading.

* ⚠️ **Breaking change:** [#2182](https://github.com/stripe/stripe-java/pull/2182) Add setHttpClient to StripeClientBuilder; clean up apiKey/authenticator coupling
- ⚠️ Removed `RequestOptions.getApiKey()`, `RequestOptions.RequestOptionsBuilder.getApiKey()`, and `StripeClient.StripeClientBuilder.getApiKey()`. Use `getAuthenticator()` instead.
- Added `StripeClient.StripeClientBuilder.setHttpClient(HttpClient)` to allow injecting a custom HTTP client.
* ⚠️ **Breaking change:** [#2187](https://github.com/stripe/stripe-java/pull/2187) Regenerate with decimal_string enabled for v2 APIs
- V2 API decimal fields changed type from `String` to `BigDecimal`. Code that reads or writes these fields as `String` will need to use `BigDecimal` instead. Affected fields:
- **V2.Core.Account** / **V2.Core.AccountPerson**: `percentOwnership`
- **PaymentEvaluation.Signals.FraudulentPayment**: `score`
- Params: `AccountCreateParams`, `PersonCreateParams`, `AccountTokenCreateParams`, `PersonTokenCreateParams` (all: `percentOwnership`)
- Params: `InvoiceItemCreateParams`, `InvoiceAddLinesParams`, `InvoiceUpdateLinesParams`, `InvoiceCreatePreviewParams` (all: `quantityDecimal`)
* ⚠️ **Breaking change:** [#2131](https://github.com/stripe/stripe-java/pull/2131) Use HTTP status code in V2 errors
- `RateLimitException` now extends `StripeException` rather than `ApiException`
- Non-200 status codes from V2 endpoints will throw a `StripeException` (e.g. `RateLimitException`, `InvalidRequestException`, etc.) like in V1 instead of a generic `ApiException`
* ⚠️ **Breaking change:** [#2190](https://github.com/stripe/stripe-java/pull/2190) Throw an error when using the wrong webhook parsing method
* ⚠️ **Breaking change:** [#2172](https://github.com/stripe/stripe-java/pull/2172) Make `RequestOptions` & `RawRequestOptions` constructors private and add Stripe-Request-Trigger header
* ⚠️ **Breaking change:** [#2181](https://github.com/stripe/stripe-java/pull/2181) Change Automatic-Module-Name to com.stripe
- Changes `Automatic-Module-Name` from `stripe.java` to `com.stripe`. Users with `requires stripe.java;` in their `module-info.java` will need to update to `requires com.stripe;`.
* [#2179](https://github.com/stripe/stripe-java/pull/2179) Add runtime support for V2 int64 string-encoded fields


### ⚠️ Breaking changes due to changes in the Stripe API

* Generated changes from [#2170](https://github.com/stripe/stripe-java/pull/2170), [#2193](https://github.com/stripe/stripe-java/pull/2193), [#2191](https://github.com/stripe/stripe-java/pull/2191)
* Add support for `upiPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
* Add support for `upi` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentCreateParams.payment_method_options`, `SetupIntentUpdateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_options`, `checkout.Session.payment_method_options`, and `checkout.SessionCreateParams.payment_method_options`
* Add support for `integrationIdentifier` on `checkout.SessionCreateParams` and `checkout.Session`
* Add support for new value `upi` on enums `PaymentIntentConfirmParams.excludedPaymentMethodTypes`, `PaymentIntentCreateParams.excludedPaymentMethodTypes`, `PaymentIntentUpdateParams.excludedPaymentMethodTypes`, `SetupIntentCreateParams.excludedPaymentMethodTypes`, `SetupIntentUpdateParams.excludedPaymentMethodTypes`, and `checkout.SessionCreateParams.excludedPaymentMethodTypes`
* Add support for `crypto` on `checkout.SessionCreateParams.payment_method_options`
* Add support for new value `upi` on enum `checkout.SessionCreateParams.paymentMethodTypes`
* Add support for `pendingInvoiceItemInterval` on `checkout.SessionCreateParams.subscription_data`
* Add support for new values `elements`, `embedded_page`, `form`, and `hosted_page` on enum `checkout.SessionCreateParams.uiMode`
* Add support for new value `upi` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for `metadata` on `CreditNoteCreateParams.lines[]`, `CreditNoteLineItem`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
* Add support for new value `upi` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
* Add support for `quantityDecimal` on `InvoiceAddLinesParams.lines[]`, `InvoiceCreatePreviewParams.invoice_items[]`, `InvoiceItemCreateParams`, `InvoiceItemUpdateParams`, `InvoiceItem`, `InvoiceLineItemUpdateParams`, `InvoiceLineItem`, and `InvoiceUpdateLinesParams.lines[]`
* ⚠️ Add support for `level` on `issuing.AuthorizationCreateParams.risk_assessment.card_testing_risk` and `issuing.AuthorizationCreateParams.risk_assessment.merchant_dispute_risk`
* ⚠️ Remove support for `riskLevel` on `issuing.AuthorizationCreateParams.risk_assessment.card_testing_risk` and `issuing.AuthorizationCreateParams.risk_assessment.merchant_dispute_risk`
* Add support for `lifecycleControls` on `issuing.CardCreateParams` and `issuing.Card`
* Add support for `cryptogram`, `electronicCommerceIndicator`, `exemptionIndicatorApplied`, and `exemptionIndicator` on `PaymentAttemptRecord.payment_method_details.card.three_d_secure` and `PaymentRecord.payment_method_details.card.three_d_secure`
* Add support for `upiHandleRedirectOrDisplayQrCode` on `PaymentIntent.next_action` and `SetupIntent.next_action`
* Add support for new value `upi` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes`
* Add support for `recommendedAction` and `signals` on `radar.PaymentEvaluation`
* ⚠️ Remove support for `insights` on `radar.PaymentEvaluation`
* Add support for new value `crypto_fingerprint` on enum `radar.ValueListCreateParams.itemType`
* Add support for new value `2026-03-25.dahlia` on enum `WebhookEndpointCreateParams.apiVersion`
* ⚠️ Change type of `v2.core.EventDestinationCreateParams.eventsFrom` from `enum('other_accounts'|'self')` to `string`

## 31.5.0-beta.1 - 2026-02-25
This release changes the pinned API version to `2026-02-25.preview`.

Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25e6bd225852aa44d783e9fb3b9895af39479331
c7b078fa024c2a69032f464e75a24aa13d9befc8
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2206
v2249
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 = "2026-03-25.preview";
public static final String CURRENT = "2026-04-22.preview";
}
12 changes: 12 additions & 0 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,18 @@ public com.stripe.service.SetupIntentService setupIntents() {
return new com.stripe.service.SetupIntentService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.sharedPayment() is deprecated, use StripeClient.v1().sharedPayment()
* instead. All functionality under it has been copied over to
* StripeClient.v1().sharedPayment(). See <a
* href="https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient">migration
* guide</a> for more on this and tips on migrating to the new v1 namespace.
*/
@Deprecated
public com.stripe.service.SharedPaymentService sharedPayment() {
return new com.stripe.service.SharedPaymentService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.shippingRates() is deprecated, use StripeClient.v1().shippingRates()
* instead. All functionality under it has been copied over to
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("amazon_pay_payments")
String amazonPayPayments;

/**
* The status of the {@code app_distribution} capability of the account, or whether the platform
* can distribute apps to other accounts.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("app_distribution")
String appDistribution;

/**
* The status of the BECS Direct Debit (AU) payments capability of the account, or whether the
* account can directly process BECS Direct Debit (AU) charges.
Expand Down Expand Up @@ -1426,6 +1435,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("stripe_balance_payments")
String stripeBalancePayments;

/**
* The status of the Sunbit capability of the account, or whether the account can directly
* process Sunbit payments.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("sunbit_payments")
String sunbitPayments;

/**
* The status of the Swish capability of the account, or whether the account can directly
* process Swish payments.
Expand Down
56 changes: 56 additions & 0 deletions src/main/java/com/stripe/model/AccountSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ public static class Components extends StripeObject {
@SerializedName("account_onboarding")
AccountOnboarding accountOnboarding;

@SerializedName("balance_report")
BalanceReport balanceReport;

@SerializedName("balances")
Balances balances;

Expand Down Expand Up @@ -180,6 +183,9 @@ public static class Components extends StripeObject {
@SerializedName("payout_details")
PayoutDetails payoutDetails;

@SerializedName("payout_reconciliation_report")
PayoutReconciliationReport payoutReconciliationReport;

@SerializedName("payouts")
Payouts payouts;

Expand Down Expand Up @@ -280,6 +286,31 @@ public static class Features extends StripeObject {
}
}

/**
* For more details about BalanceReport, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BalanceReport extends StripeObject {
/** Whether the embedded component is enabled. */
@SerializedName("enabled")
Boolean enabled;

@SerializedName("features")
Features features;

/**
* For more details about Features, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {}
}

/**
* For more details about Balances, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down Expand Up @@ -935,6 +966,31 @@ public static class PayoutDetails extends StripeObject {
public static class Features extends StripeObject {}
}

/**
* For more details about PayoutReconciliationReport, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PayoutReconciliationReport extends StripeObject {
/** Whether the embedded component is enabled. */
@SerializedName("enabled")
Boolean enabled;

@SerializedName("features")
Features features;

/**
* For more details about Features, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {}
}

/**
* For more details about Payouts, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public class BalanceTransaction extends ApiResource implements HasId {
* Transaction type: {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
* charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code
* connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code
* connect_collection_transfer}, {@code contribution}, {@code inbound_transfer}, {@code
* inbound_transfer_reversal}, {@code issuing_authorization_hold}, {@code
* issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code
* obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
Expand All @@ -142,17 +143,18 @@ public class BalanceTransaction extends ApiResource implements HasId {
* {@code reserve_release}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code
* stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code tax_fee},
* {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code
* transfer_failure}, or {@code transfer_refund}. Learn more about <a
* transfer_failure}, {@code transfer_refund}, or {@code fee_credit_funding}. Learn more about <a
* href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and
* what they represent</a>. To classify transactions for accounting purposes, consider {@code
* reporting_category} instead.
*
* <p>One of {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
* charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code
* connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code
* issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code
* obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
* connect_collection_transfer}, {@code contribution}, {@code fee_credit_funding}, {@code
* inbound_transfer}, {@code inbound_transfer_reversal}, {@code issuing_authorization_hold},
* {@code issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction},
* {@code obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
Expand Down Expand Up @@ -331,7 +333,7 @@ public static class FeeDetail extends StripeObject {

/**
* Type of the fee, one of: {@code application_fee}, {@code payment_method_passthrough_fee},
* {@code stripe_fee} or {@code tax}.
* {@code stripe_fee}, {@code tax}, or {@code withheld_tax}.
*/
@SerializedName("type")
String type;
Expand Down
44 changes: 34 additions & 10 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("stripe_balance")
StripeBalance stripeBalance;

@SerializedName("sunbit")
Sunbit sunbit;

@SerializedName("swish")
Swish swish;

Expand Down Expand Up @@ -1471,17 +1474,11 @@ public static class AcssDebit extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Affirm extends StripeObject {
/**
* ID of the <a href="https://docs.stripe.com/api/terminal/locations">location</a> that this
* transaction's reader is assigned to.
*/
/** ID of the location that this reader is assigned to. */
@SerializedName("location")
String location;

/**
* ID of the <a href="https://docs.stripe.com/api/terminal/readers">reader</a> this
* transaction was made on.
*/
/** ID of the reader this transaction was made on. */
@SerializedName("reader")
String reader;

Expand All @@ -1502,7 +1499,7 @@ public static class AfterpayClearpay extends StripeObject {
@SerializedName("order_id")
String orderId;

/** Order identifier shown to the merchant in Afterpays online portal. */
/** Order identifier shown to the merchant in Afterpay's online portal. */
@SerializedName("reference")
String reference;
}
Expand Down Expand Up @@ -2812,7 +2809,7 @@ public static class Crypto extends StripeObject {
/**
* The token currency that the transaction was sent with.
*
* <p>One of {@code usdc}, {@code usdg}, or {@code usdp}.
* <p>One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, or {@code usdt}.
*/
@SerializedName("token_currency")
String tokenCurrency;
Expand Down Expand Up @@ -3326,6 +3323,13 @@ public static class KakaoPay extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Klarna extends StripeObject {
/**
* ID of the <a href="https://docs.stripe.com/api/terminal/locations">location</a> that this
* transaction's reader is assigned to.
*/
@SerializedName("location")
String location;

/** The payer details for this transaction. */
@SerializedName("payer_details")
PayerDetails payerDetails;
Expand All @@ -3351,6 +3355,13 @@ public static class Klarna extends StripeObject {
@SerializedName("preferred_locale")
String preferredLocale;

/**
* ID of the <a href="https://docs.stripe.com/api/terminal/readers">reader</a> this
* transaction was made on.
*/
@SerializedName("reader")
String reader;

/**
* For more details about PayerDetails, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down Expand Up @@ -4185,6 +4196,19 @@ public static class StripeBalance extends StripeObject {
String account;
}

/**
* For more details about Sunbit, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Sunbit extends StripeObject {
/** The Sunbit transaction ID associated with this payment. */
@SerializedName("transaction_id")
String transactionId;
}

/**
* For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
Loading
Loading