Skip to content

Commit 5db7b92

Browse files
Merge pull request #2198 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 2cfbd7f + fb33888 commit 5db7b92

99 files changed

Lines changed: 9640 additions & 605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,58 @@ This release changes the pinned API version to `2026-03-25.preview`. It is built
4848
* [#2189](https://github.com/stripe/stripe-java/pull/2189) Merge to beta
4949
* [#2175](https://github.com/stripe/stripe-java/pull/2175) Merge to beta
5050

51+
## 32.0.0 - 2026-03-25
52+
53+
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.
54+
55+
Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/dahlia) before upgrading.
56+
57+
* ⚠️ **Breaking change:** [#2182](https://github.com/stripe/stripe-java/pull/2182) Add setHttpClient to StripeClientBuilder; clean up apiKey/authenticator coupling
58+
- ⚠️ Removed `RequestOptions.getApiKey()`, `RequestOptions.RequestOptionsBuilder.getApiKey()`, and `StripeClient.StripeClientBuilder.getApiKey()`. Use `getAuthenticator()` instead.
59+
- Added `StripeClient.StripeClientBuilder.setHttpClient(HttpClient)` to allow injecting a custom HTTP client.
60+
* ⚠️ **Breaking change:** [#2187](https://github.com/stripe/stripe-java/pull/2187) Regenerate with decimal_string enabled for v2 APIs
61+
- 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:
62+
- **V2.Core.Account** / **V2.Core.AccountPerson**: `percentOwnership`
63+
- **PaymentEvaluation.Signals.FraudulentPayment**: `score`
64+
- Params: `AccountCreateParams`, `PersonCreateParams`, `AccountTokenCreateParams`, `PersonTokenCreateParams` (all: `percentOwnership`)
65+
- Params: `InvoiceItemCreateParams`, `InvoiceAddLinesParams`, `InvoiceUpdateLinesParams`, `InvoiceCreatePreviewParams` (all: `quantityDecimal`)
66+
* ⚠️ **Breaking change:** [#2131](https://github.com/stripe/stripe-java/pull/2131) Use HTTP status code in V2 errors
67+
- `RateLimitException` now extends `StripeException` rather than `ApiException`
68+
- Non-200 status codes from V2 endpoints will throw a `StripeException` (e.g. `RateLimitException`, `InvalidRequestException`, etc.) like in V1 instead of a generic `ApiException`
69+
* ⚠️ **Breaking change:** [#2190](https://github.com/stripe/stripe-java/pull/2190) Throw an error when using the wrong webhook parsing method
70+
* ⚠️ **Breaking change:** [#2172](https://github.com/stripe/stripe-java/pull/2172) Make `RequestOptions` & `RawRequestOptions` constructors private and add Stripe-Request-Trigger header
71+
* ⚠️ **Breaking change:** [#2181](https://github.com/stripe/stripe-java/pull/2181) Change Automatic-Module-Name to com.stripe
72+
- 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;`.
73+
* [#2179](https://github.com/stripe/stripe-java/pull/2179) Add runtime support for V2 int64 string-encoded fields
74+
75+
76+
### ⚠️ Breaking changes due to changes in the Stripe API
77+
78+
* 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)
79+
* Add support for `upiPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
80+
* 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`
81+
* Add support for `integrationIdentifier` on `checkout.SessionCreateParams` and `checkout.Session`
82+
* Add support for new value `upi` on enums `PaymentIntentConfirmParams.excludedPaymentMethodTypes`, `PaymentIntentCreateParams.excludedPaymentMethodTypes`, `PaymentIntentUpdateParams.excludedPaymentMethodTypes`, `SetupIntentCreateParams.excludedPaymentMethodTypes`, `SetupIntentUpdateParams.excludedPaymentMethodTypes`, and `checkout.SessionCreateParams.excludedPaymentMethodTypes`
83+
* Add support for `crypto` on `checkout.SessionCreateParams.payment_method_options`
84+
* Add support for new value `upi` on enum `checkout.SessionCreateParams.paymentMethodTypes`
85+
* Add support for `pendingInvoiceItemInterval` on `checkout.SessionCreateParams.subscription_data`
86+
* Add support for new values `elements`, `embedded_page`, `form`, and `hosted_page` on enum `checkout.SessionCreateParams.uiMode`
87+
* 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`
88+
* Add support for `metadata` on `CreditNoteCreateParams.lines[]`, `CreditNoteLineItem`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
89+
* Add support for new value `upi` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
90+
* Add support for `quantityDecimal` on `InvoiceAddLinesParams.lines[]`, `InvoiceCreatePreviewParams.invoice_items[]`, `InvoiceItemCreateParams`, `InvoiceItemUpdateParams`, `InvoiceItem`, `InvoiceLineItemUpdateParams`, `InvoiceLineItem`, and `InvoiceUpdateLinesParams.lines[]`
91+
* ⚠️ Add support for `level` on `issuing.AuthorizationCreateParams.risk_assessment.card_testing_risk` and `issuing.AuthorizationCreateParams.risk_assessment.merchant_dispute_risk`
92+
* ⚠️ Remove support for `riskLevel` on `issuing.AuthorizationCreateParams.risk_assessment.card_testing_risk` and `issuing.AuthorizationCreateParams.risk_assessment.merchant_dispute_risk`
93+
* Add support for `lifecycleControls` on `issuing.CardCreateParams` and `issuing.Card`
94+
* 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`
95+
* Add support for `upiHandleRedirectOrDisplayQrCode` on `PaymentIntent.next_action` and `SetupIntent.next_action`
96+
* Add support for new value `upi` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes`
97+
* Add support for `recommendedAction` and `signals` on `radar.PaymentEvaluation`
98+
* ⚠️ Remove support for `insights` on `radar.PaymentEvaluation`
99+
* Add support for new value `crypto_fingerprint` on enum `radar.ValueListCreateParams.itemType`
100+
* Add support for new value `2026-03-25.dahlia` on enum `WebhookEndpointCreateParams.apiVersion`
101+
* ⚠️ Change type of `v2.core.EventDestinationCreateParams.eventsFrom` from `enum('other_accounts'|'self')` to `string`
102+
51103
## 31.5.0-beta.1 - 2026-02-25
52104
This release changes the pinned API version to `2026-02-25.preview`.
53105

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25e6bd225852aa44d783e9fb3b9895af39479331
1+
c7b078fa024c2a69032f464e75a24aa13d9befc8

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2206
1+
v2249

src/main/java/com/stripe/ApiVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
package com.stripe;
33

44
final class ApiVersion {
5-
public static final String CURRENT = "2026-03-25.preview";
5+
public static final String CURRENT = "2026-04-22.preview";
66
}

src/main/java/com/stripe/StripeClient.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,18 @@ public com.stripe.service.SetupIntentService setupIntents() {
919919
return new com.stripe.service.SetupIntentService(this.getResponseGetter());
920920
}
921921

922+
/**
923+
* @deprecated StripeClient.sharedPayment() is deprecated, use StripeClient.v1().sharedPayment()
924+
* instead. All functionality under it has been copied over to
925+
* StripeClient.v1().sharedPayment(). See <a
926+
* href="https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient">migration
927+
* guide</a> for more on this and tips on migrating to the new v1 namespace.
928+
*/
929+
@Deprecated
930+
public com.stripe.service.SharedPaymentService sharedPayment() {
931+
return new com.stripe.service.SharedPaymentService(this.getResponseGetter());
932+
}
933+
922934
/**
923935
* @deprecated StripeClient.shippingRates() is deprecated, use StripeClient.v1().shippingRates()
924936
* instead. All functionality under it has been copied over to

src/main/java/com/stripe/model/Account.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,15 @@ public static class Capabilities extends StripeObject {
916916
@SerializedName("amazon_pay_payments")
917917
String amazonPayPayments;
918918

919+
/**
920+
* The status of the {@code app_distribution} capability of the account, or whether the platform
921+
* can distribute apps to other accounts.
922+
*
923+
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
924+
*/
925+
@SerializedName("app_distribution")
926+
String appDistribution;
927+
919928
/**
920929
* The status of the BECS Direct Debit (AU) payments capability of the account, or whether the
921930
* account can directly process BECS Direct Debit (AU) charges.
@@ -1426,6 +1435,15 @@ public static class Capabilities extends StripeObject {
14261435
@SerializedName("stripe_balance_payments")
14271436
String stripeBalancePayments;
14281437

1438+
/**
1439+
* The status of the Sunbit capability of the account, or whether the account can directly
1440+
* process Sunbit payments.
1441+
*
1442+
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
1443+
*/
1444+
@SerializedName("sunbit_payments")
1445+
String sunbitPayments;
1446+
14291447
/**
14301448
* The status of the Swish capability of the account, or whether the account can directly
14311449
* process Swish payments.

src/main/java/com/stripe/model/AccountSession.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ public static class Components extends StripeObject {
132132
@SerializedName("account_onboarding")
133133
AccountOnboarding accountOnboarding;
134134

135+
@SerializedName("balance_report")
136+
BalanceReport balanceReport;
137+
135138
@SerializedName("balances")
136139
Balances balances;
137140

@@ -180,6 +183,9 @@ public static class Components extends StripeObject {
180183
@SerializedName("payout_details")
181184
PayoutDetails payoutDetails;
182185

186+
@SerializedName("payout_reconciliation_report")
187+
PayoutReconciliationReport payoutReconciliationReport;
188+
183189
@SerializedName("payouts")
184190
Payouts payouts;
185191

@@ -280,6 +286,31 @@ public static class Features extends StripeObject {
280286
}
281287
}
282288

289+
/**
290+
* For more details about BalanceReport, please refer to the <a
291+
* href="https://docs.stripe.com/api">API Reference.</a>
292+
*/
293+
@Getter
294+
@Setter
295+
@EqualsAndHashCode(callSuper = false)
296+
public static class BalanceReport extends StripeObject {
297+
/** Whether the embedded component is enabled. */
298+
@SerializedName("enabled")
299+
Boolean enabled;
300+
301+
@SerializedName("features")
302+
Features features;
303+
304+
/**
305+
* For more details about Features, please refer to the <a
306+
* href="https://docs.stripe.com/api">API Reference.</a>
307+
*/
308+
@Getter
309+
@Setter
310+
@EqualsAndHashCode(callSuper = false)
311+
public static class Features extends StripeObject {}
312+
}
313+
283314
/**
284315
* For more details about Balances, please refer to the <a
285316
* href="https://docs.stripe.com/api">API Reference.</a>
@@ -935,6 +966,31 @@ public static class PayoutDetails extends StripeObject {
935966
public static class Features extends StripeObject {}
936967
}
937968

969+
/**
970+
* For more details about PayoutReconciliationReport, please refer to the <a
971+
* href="https://docs.stripe.com/api">API Reference.</a>
972+
*/
973+
@Getter
974+
@Setter
975+
@EqualsAndHashCode(callSuper = false)
976+
public static class PayoutReconciliationReport extends StripeObject {
977+
/** Whether the embedded component is enabled. */
978+
@SerializedName("enabled")
979+
Boolean enabled;
980+
981+
@SerializedName("features")
982+
Features features;
983+
984+
/**
985+
* For more details about Features, please refer to the <a
986+
* href="https://docs.stripe.com/api">API Reference.</a>
987+
*/
988+
@Getter
989+
@Setter
990+
@EqualsAndHashCode(callSuper = false)
991+
public static class Features extends StripeObject {}
992+
}
993+
938994
/**
939995
* For more details about Payouts, please refer to the <a href="https://docs.stripe.com/api">API
940996
* Reference.</a>

src/main/java/com/stripe/model/BalanceTransaction.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public class BalanceTransaction extends ApiResource implements HasId {
131131
* Transaction type: {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
132132
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
133133
* charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code
134-
* connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code
134+
* connect_collection_transfer}, {@code contribution}, {@code inbound_transfer}, {@code
135+
* inbound_transfer_reversal}, {@code issuing_authorization_hold}, {@code
135136
* issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code
136137
* obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
137138
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
@@ -142,17 +143,18 @@ public class BalanceTransaction extends ApiResource implements HasId {
142143
* {@code reserve_release}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code
143144
* stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code tax_fee},
144145
* {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code
145-
* transfer_failure}, or {@code transfer_refund}. Learn more about <a
146+
* transfer_failure}, {@code transfer_refund}, or {@code fee_credit_funding}. Learn more about <a
146147
* href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and
147148
* what they represent</a>. To classify transactions for accounting purposes, consider {@code
148149
* reporting_category} instead.
149150
*
150151
* <p>One of {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
151152
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
152153
* charge}, {@code climate_order_purchase}, {@code climate_order_refund}, {@code
153-
* connect_collection_transfer}, {@code contribution}, {@code issuing_authorization_hold}, {@code
154-
* issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction}, {@code
155-
* obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
154+
* connect_collection_transfer}, {@code contribution}, {@code fee_credit_funding}, {@code
155+
* inbound_transfer}, {@code inbound_transfer_reversal}, {@code issuing_authorization_hold},
156+
* {@code issuing_authorization_release}, {@code issuing_dispute}, {@code issuing_transaction},
157+
* {@code obligation_outbound}, {@code obligation_reversal_inbound}, {@code payment}, {@code
156158
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
157159
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
158160
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
@@ -331,7 +333,7 @@ public static class FeeDetail extends StripeObject {
331333

332334
/**
333335
* Type of the fee, one of: {@code application_fee}, {@code payment_method_passthrough_fee},
334-
* {@code stripe_fee} or {@code tax}.
336+
* {@code stripe_fee}, {@code tax}, or {@code withheld_tax}.
335337
*/
336338
@SerializedName("type")
337339
String type;

src/main/java/com/stripe/model/Charge.java

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,9 @@ public static class PaymentMethodDetails extends StripeObject {
13241324
@SerializedName("stripe_balance")
13251325
StripeBalance stripeBalance;
13261326

1327+
@SerializedName("sunbit")
1328+
Sunbit sunbit;
1329+
13271330
@SerializedName("swish")
13281331
Swish swish;
13291332

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

1481-
/**
1482-
* ID of the <a href="https://docs.stripe.com/api/terminal/readers">reader</a> this
1483-
* transaction was made on.
1484-
*/
1481+
/** ID of the reader this transaction was made on. */
14851482
@SerializedName("reader")
14861483
String reader;
14871484

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

1505-
/** Order identifier shown to the merchant in Afterpays online portal. */
1502+
/** Order identifier shown to the merchant in Afterpay's online portal. */
15061503
@SerializedName("reference")
15071504
String reference;
15081505
}
@@ -2812,7 +2809,7 @@ public static class Crypto extends StripeObject {
28122809
/**
28132810
* The token currency that the transaction was sent with.
28142811
*
2815-
* <p>One of {@code usdc}, {@code usdg}, or {@code usdp}.
2812+
* <p>One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, or {@code usdt}.
28162813
*/
28172814
@SerializedName("token_currency")
28182815
String tokenCurrency;
@@ -3326,6 +3323,13 @@ public static class KakaoPay extends StripeObject {
33263323
@Setter
33273324
@EqualsAndHashCode(callSuper = false)
33283325
public static class Klarna extends StripeObject {
3326+
/**
3327+
* ID of the <a href="https://docs.stripe.com/api/terminal/locations">location</a> that this
3328+
* transaction's reader is assigned to.
3329+
*/
3330+
@SerializedName("location")
3331+
String location;
3332+
33293333
/** The payer details for this transaction. */
33303334
@SerializedName("payer_details")
33313335
PayerDetails payerDetails;
@@ -3351,6 +3355,13 @@ public static class Klarna extends StripeObject {
33513355
@SerializedName("preferred_locale")
33523356
String preferredLocale;
33533357

3358+
/**
3359+
* ID of the <a href="https://docs.stripe.com/api/terminal/readers">reader</a> this
3360+
* transaction was made on.
3361+
*/
3362+
@SerializedName("reader")
3363+
String reader;
3364+
33543365
/**
33553366
* For more details about PayerDetails, please refer to the <a
33563367
* href="https://docs.stripe.com/api">API Reference.</a>
@@ -4185,6 +4196,19 @@ public static class StripeBalance extends StripeObject {
41854196
String account;
41864197
}
41874198

4199+
/**
4200+
* For more details about Sunbit, please refer to the <a href="https://docs.stripe.com/api">API
4201+
* Reference.</a>
4202+
*/
4203+
@Getter
4204+
@Setter
4205+
@EqualsAndHashCode(callSuper = false)
4206+
public static class Sunbit extends StripeObject {
4207+
/** The Sunbit transaction ID associated with this payment. */
4208+
@SerializedName("transaction_id")
4209+
String transactionId;
4210+
}
4211+
41884212
/**
41894213
* For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
41904214
* Reference.</a>

0 commit comments

Comments
 (0)