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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,46 @@ This release changes the pinned API version to 2026-07-29.preview.
* Add support for `payout` on `v2.moneymanagement.ReceivedCredit.balance_transfer`
* ⚠️ Remove support for `payoutV1` on `v2.moneymanagement.ReceivedCredit.balance_transfer`

## 33.2.0 - 2026-07-29
This release changes the pinned API version to 2026-07-29.dahlia.

* [#2257](https://github.com/stripe/stripe-java/pull/2257) Update generated code
* Add support for new resource `financialconnections.Authorization`
* Add support for `unreject` method on resource `Account`
* Add support for `list` method on resource `PaymentRecord`
* Add support for `smartDisputesManagement` on `AccountSession.components.disputes_list.features`, `AccountSession.components.payment_details.features`, `AccountSession.components.payment_disputes.features`, `AccountSession.components.payments.features`, `AccountSessionCreateParams.components.disputes_list.features`, `AccountSessionCreateParams.components.payment_details.features`, `AccountSessionCreateParams.components.payment_disputes.features`, and `AccountSessionCreateParams.components.payments.features`
* Add support for `administrativeAddress` and `principalPlaceOfBusiness` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company`
* Add support for `sepaDebitPayments` on `AccountUpdateParams.settings`
* Remove support for `proofOfRegistration` on `AccountCreateParams.documents`. This field was limited-use and is being deprecated.
* Add support for `payoutsAction` on `AccountRejectParams`
* Remove support for `dynamicTaxRates` on `checkout.SessionCreateParams.line_items[]`. This field was limited-use and is being deprecated.
* Add support for `setupFutureUsage` on `PaymentIntent.payment_method_options.payco`, `PaymentIntent.payment_method_options.samsung_pay`, `PaymentIntentConfirmParams.payment_method_options.payco`, `PaymentIntentConfirmParams.payment_method_options.samsung_pay`, `PaymentIntentCreateParams.payment_method_options.payco`, `PaymentIntentCreateParams.payment_method_options.samsung_pay`, `PaymentIntentUpdateParams.payment_method_options.payco`, `PaymentIntentUpdateParams.payment_method_options.samsung_pay`, `PaymentLinkUpdateParams.payment_intent_data`, `checkout.Session.payment_method_options.payco`, `checkout.Session.payment_method_options.samsung_pay`, `checkout.SessionCreateParams.payment_method_options.payco`, and `checkout.SessionCreateParams.payment_method_options.samsung_pay`
* Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `ConfirmationTokenCreateParams.payment_method_data.fpx.bank`, `PaymentIntentConfirmParams.payment_method_data.fpx.bank`, `PaymentIntentCreateParams.payment_method_data.fpx.bank`, `PaymentIntentUpdateParams.payment_method_data.fpx.bank`, `PaymentMethodCreateParams.fpx.bank`, `SetupIntentConfirmParams.payment_method_data.fpx.bank`, `SetupIntentCreateParams.payment_method_data.fpx.bank`, and `SetupIntentUpdateParams.payment_method_data.fpx.bank`
* Add support for new value `ic_nif` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type`
* Add support for `network` on `Dispute.payment_method_details.card`
* Add support for `limits` and `manualEntry` on `financialconnections.SessionCreateParams` and `financialconnections.Session`
* Add support for `requirePaymentMethodSupport` on `financialconnections.Session.filters` and `financialconnections.SessionCreateParams.filters`
* Add support for `bankAccountToken` on `financialconnections.Session`
* Add support for new values `alipay` and `mb_way` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes`
* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `InvoiceLineItemUpdateParams.tax_amounts[].tax_rate_data.taxType`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `TaxRateCreateParams.taxType`, and `TaxRateUpdateParams.taxType`
* Add support for `metadata` on `InvoiceCreatePreviewParams.subscription_details`
* Add support for `businessName` on `issuing.Card.shipping`, `issuing.CardCreateParams.shipping`, and `issuing.CardUpdateParams.shipping`
* Add support for `allowedPaymentMethodTypes` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentUpdateParams`, `PaymentIntent`, `SetupIntentConfirmParams`, `SetupIntentCreateParams`, `SetupIntentUpdateParams`, and `SetupIntent`
* Add support for `referrer` on `PaymentIntentConfirmParams.radar_options` and `PaymentIntentCreateParams.radar_options`
* Add support for `consentCollection` and `shippingOptions` on `PaymentLinkUpdateParams`
* Add support for `customFields`, `description`, and `footer` on `Quote.invoice_settings`, `QuoteCreateParams.invoice_settings`, `QuoteUpdateParams.invoice_settings`, `SubscriptionSchedule.default_settings.invoice_settings`, `SubscriptionSchedule.phases[].invoice_settings`, `SubscriptionScheduleCreateParams.default_settings.invoice_settings`, `SubscriptionScheduleCreateParams.phases[].invoice_settings`, `SubscriptionScheduleUpdateParams.default_settings.invoice_settings`, and `SubscriptionScheduleUpdateParams.phases[].invoice_settings`
* Add support for `customerAccount` and `customer` on `Refund`
* Add support for `paymentMethod` on `Refund` and `Topup`
* Add support for `trial` on `SubscriptionSchedule.phases[]`
* Add support for `massTransitParkingTax` and `parkingTax` on `tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us`
* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `tax.RegistrationCreateParams.country_options.us.type`
* Add support for `initiatedBy` and `paymentMethodOptions` on `Topup`
* Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents`
* Add support for new value `2026-07-29.dahlia` on enum `WebhookEndpointCreateParams.apiVersion`
* Add support for `additionalAddresses` on `v2.core.Account.identity.business_details`, `v2.core.AccountCreateParams.identity.business_details`, `v2.core.AccountTokenCreateParams.identity.business_details`, and `v2.core.AccountUpdateParams.identity.business_details`
* Add support for snapshot events `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, and `financial_connections.account.upcoming_deactivation` with resource `financialconnections.Account`
* Add support for snapshot events `financial_connections.authorization.expected_deactivation_date_updated` and `financial_connections.authorization.upcoming_deactivation` with resource `financialconnections.Authorization`

## 33.2.0-beta.1 - 2026-06-24
This release changes the pinned API version to 2026-06-24.preview.

Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
44014016ec56efb57a8cf6d0ee0771c2e6b4eebe
d1fd596a17b3207a9b90b100409a04e20e147962
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2349
v2390
1 change: 1 addition & 0 deletions src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

final class ApiVersion {
public static final String CURRENT = "2026-07-29.preview";
public static final String CURRENT_MAJOR = "";
}
6 changes: 6 additions & 0 deletions src/main/java/com/stripe/Stripe.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public abstract class Stripe {
public static final int DEFAULT_READ_TIMEOUT = 80 * 1000;

public static final String API_VERSION = ApiVersion.CURRENT;
/**
* The major API version that this SDK uses. Objects retrieved using the same major version are
* compatible. Is an empty string in preview versions of the SDK.
*/
public static final String MAJOR_API_VERSION = ApiVersion.CURRENT_MAJOR;

public static final String CONNECT_API_BASE = "https://connect.stripe.com";
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
Expand Down
47 changes: 44 additions & 3 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.stripe.exception.SignatureVerificationException;
import com.stripe.exception.StripeException;
import com.stripe.model.Event;
import com.stripe.model.StripeObject;
import com.stripe.model.v2.core.EventNotification;
import com.stripe.net.*;
Expand Down Expand Up @@ -115,9 +116,10 @@ public EventNotification parseEventNotification(String payload, String sigHeader
}

/**
* Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException
* if the payload is not valid JSON, and a SignatureVerificationException if the signature
* verification fails for any reason.
* Constructs a <a href="https://docs.stripe.com/event-destinations#thin-payload">thin event
* notification</a> from an incoming webhook after verifying its authenticity. To work with a
* webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue,
* or during testing), see {@code parseEventNotificationWithoutVerification}.
*
* @param payload the payload sent by Stripe.
* @param sigHeader the contents of the signature header sent by Stripe.
Expand Down Expand Up @@ -174,6 +176,45 @@ public com.stripe.model.Event constructEvent(
return event;
}

/**
* Constructs a <a href="https://docs.stripe.com/event-destinations#snapshot-payload">snapshot
* event</a> from an incoming webhook without first verifying its authenticity. Should be used
* after calling {@code Webhook.Signature.verifyHeader(...)} or with input from a trusted source
* (such as <a href="https://docs.stripe.com/event-destinations/eventbridge">AWS EventBridge</a>,
* or <a href="https://docs.stripe.com/event-destinations/eventgrid">Azure Event Grid</a>
* payload). Or, to verify &amp; construct in a single call, use {@code constructEvent(...)}
* instead.
*
* @param payload the JSON payload: a raw Stripe Event or an AWS EventBridge/Azure Event Grid
* envelope.
* @return the Event instance.
* @throws IllegalArgumentException if the payload is a thin event notification, or if the format
* is not recognized.
*/
public com.stripe.model.Event constructEventWithoutVerification(String payload) {
Event event = Webhook.constructEventWithoutVerification(payload);
event.setResponseGetter(this.getResponseGetter());
return event;
}

/**
* Constructs a <a href="https://docs.stripe.com/event-destinations#thin-payload">thin event
* notification</a> from an incoming webhook without first verifying its authenticity. Should be
* used after calling {@code Webhook.Signature.verifyHeader(...)} or with input from a trusted
* source (such as <a href="https://docs.stripe.com/event-destinations/eventbridge">AWS
* EventBridge</a>, or <a href="https://docs.stripe.com/event-destinations/eventgrid">Azure Event
* Grid</a> payload). Or, to verify &amp; parse in a single call, use {@code
* parseEventNotification(...)} instead.
*
* @param payload the JSON payload: a raw Stripe Event, or an AWS EventBridge/Azure Event Grid
* envelope.
* @return the EventNotification instance.
* @throws IllegalArgumentException if the payload format is not recognized.
*/
public EventNotification parseEventNotificationWithoutVerification(String payload) {
return EventNotification.fromJson(Webhook.maybeExtractFromCloudProviderEnvelope(payload), this);
}

// The beginning of the section generated from our OpenAPI spec
public com.stripe.service.V1Services v1() {
return new com.stripe.service.V1Services(this.getResponseGetter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ private AlreadyCanceledException(
static AlreadyCanceledException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
AlreadyCanceledException.AlreadyCanceledError error =
(AlreadyCanceledException.AlreadyCanceledError)
StripeObject.deserializeStripeObject(
body, AlreadyCanceledException.AlreadyCanceledError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, AlreadyCanceledException.AlreadyCanceledError.class, responseGetter);
AlreadyCanceledException exception =
new AlreadyCanceledException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ private AlreadyExistsException(
static AlreadyExistsException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
AlreadyExistsException.AlreadyExistsError error =
(AlreadyExistsException.AlreadyExistsError)
StripeObject.deserializeStripeObject(
body, AlreadyExistsException.AlreadyExistsError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, AlreadyExistsException.AlreadyExistsError.class, responseGetter);
AlreadyExistsException exception =
new AlreadyExistsException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ private BlockedByStripeException(
static BlockedByStripeException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
BlockedByStripeException.BlockedByStripeError error =
(BlockedByStripeException.BlockedByStripeError)
StripeObject.deserializeStripeObject(
body, BlockedByStripeException.BlockedByStripeError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, BlockedByStripeException.BlockedByStripeError.class, responseGetter);
BlockedByStripeException exception =
new BlockedByStripeException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ private CannotProceedException(
static CannotProceedException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
CannotProceedException.CannotProceedError error =
(CannotProceedException.CannotProceedError)
StripeObject.deserializeStripeObject(
body, CannotProceedException.CannotProceedError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, CannotProceedException.CannotProceedError.class, responseGetter);
CannotProceedException exception =
new CannotProceedException(
error.getMessage(), requestId, error.getCode(), statusCode, null, error.getReason());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ private ControlledByAlternateResourceException(
static ControlledByAlternateResourceException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
ControlledByAlternateResourceException.ControlledByAlternateResourceError error =
(ControlledByAlternateResourceException.ControlledByAlternateResourceError)
StripeObject.deserializeStripeObject(
body,
ControlledByAlternateResourceException.ControlledByAlternateResourceError.class,
responseGetter);
StripeObject.deserializeStripeObject(
body,
ControlledByAlternateResourceException.ControlledByAlternateResourceError.class,
responseGetter);
ControlledByAlternateResourceException exception =
new ControlledByAlternateResourceException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ private ControlledByDashboardException(
static ControlledByDashboardException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
ControlledByDashboardException.ControlledByDashboardError error =
(ControlledByDashboardException.ControlledByDashboardError)
StripeObject.deserializeStripeObject(
body,
ControlledByDashboardException.ControlledByDashboardError.class,
responseGetter);
StripeObject.deserializeStripeObject(
body, ControlledByDashboardException.ControlledByDashboardError.class, responseGetter);
ControlledByDashboardException exception =
new ControlledByDashboardException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ private FeatureNotEnabledException(
static FeatureNotEnabledException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
FeatureNotEnabledException.FeatureNotEnabledError error =
(FeatureNotEnabledException.FeatureNotEnabledError)
StripeObject.deserializeStripeObject(
body, FeatureNotEnabledException.FeatureNotEnabledError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, FeatureNotEnabledException.FeatureNotEnabledError.class, responseGetter);
FeatureNotEnabledException exception =
new FeatureNotEnabledException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ private FinancialAccountNotOpenException(
static FinancialAccountNotOpenException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
FinancialAccountNotOpenException.FinancialAccountNotOpenError error =
(FinancialAccountNotOpenException.FinancialAccountNotOpenError)
StripeObject.deserializeStripeObject(
body,
FinancialAccountNotOpenException.FinancialAccountNotOpenError.class,
responseGetter);
StripeObject.deserializeStripeObject(
body,
FinancialAccountNotOpenException.FinancialAccountNotOpenError.class,
responseGetter);
FinancialAccountNotOpenException exception =
new FinancialAccountNotOpenException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ private InsufficientFundsException(
static InsufficientFundsException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
InsufficientFundsException.InsufficientFundsError error =
(InsufficientFundsException.InsufficientFundsError)
StripeObject.deserializeStripeObject(
body, InsufficientFundsException.InsufficientFundsError.class, responseGetter);
StripeObject.deserializeStripeObject(
body, InsufficientFundsException.InsufficientFundsError.class, responseGetter);
InsufficientFundsException exception =
new InsufficientFundsException(
error.getMessage(), requestId, error.getCode(), statusCode, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ private InvalidPaymentMethodException(
static InvalidPaymentMethodException parse(
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
InvalidPaymentMethodException.InvalidPaymentMethodError error =
(InvalidPaymentMethodException.InvalidPaymentMethodError)
StripeObject.deserializeStripeObject(
body,
InvalidPaymentMethodException.InvalidPaymentMethodError.class,
responseGetter);
StripeObject.deserializeStripeObject(
body, InvalidPaymentMethodException.InvalidPaymentMethodError.class, responseGetter);
InvalidPaymentMethodException exception =
new InvalidPaymentMethodException(
error.getMessage(),
Expand Down
Loading
Loading