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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 31.2.0 - 2026-01-16
* [#2144](https://github.com/stripe/stripe-java/pull/2144) Update generated code
* Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account`
* Add support for event notification `V2CoreAccountLinkReturnedEvent`
* Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `v2.core.AccountPerson`

## 31.2.0-beta.1 - 2025-12-16
This release changes the pinned API version to `2025-12-15.preview`.

Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5abe0e44caedb3474ee672265284096ec89e0fa3
4b127bb86d90ffa5605a1c2fa189ebf94ac3d42d
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2150
v2157
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-12-15.preview";
public static final String CURRENT = "2026-01-28.preview";
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.stripe.events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification;
import com.stripe.events.V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification;
import com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification;
import com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification;
import com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification;
import com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEventNotification;
import com.stripe.events.V2CoreAccountLinkReturnedEventNotification;
Expand Down Expand Up @@ -276,6 +277,12 @@ public StripeEventNotificationHandler onV2CoreAccountIncludingDefaultsUpdated(
return this;
}

public StripeEventNotificationHandler onV2CoreAccountIncludingFutureRequirementsUpdated(
Callback<V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification> callback) {
this.register("v2.core.account[future_requirements].updated", callback);
return this;
}

public StripeEventNotificationHandler onV2CoreAccountIncludingIdentityUpdated(
Callback<V2CoreAccountIncludingIdentityUpdatedEventNotification> callback) {
this.register("v2.core.account[identity].updated", callback);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// File generated from our OpenAPI spec
package com.stripe.events;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.model.v2.core.Account;
import com.stripe.model.v2.core.Event;
import com.stripe.model.v2.core.Event.RelatedObject;
import lombok.Getter;

@Getter
public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event {
@SerializedName("related_object")

/** Object containing the reference to API resource relevant to the event. */
RelatedObject relatedObject;

/** Retrieves the related object from the API. Make an API request on every call. */
public Account fetchRelatedObject() throws StripeException {
return (Account) super.fetchRelatedObject(this.relatedObject);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// File generated from our OpenAPI spec
package com.stripe.events;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.model.v2.core.Account;
import com.stripe.model.v2.core.Event.RelatedObject;
import com.stripe.model.v2.core.EventNotification;
import lombok.Getter;

@Getter
public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification
extends EventNotification {
@SerializedName("related_object")

/** Object containing the reference to API resource relevant to the event. */
RelatedObject relatedObject;

/** Retrieves the related object from the API. Make an API request on every call. */
public Account fetchRelatedObject() throws StripeException {
return (Account) super.fetchRelatedObject(this.relatedObject);
}
/** Retrieve the corresponding full event from the Stripe API. */
@Override
public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException {
return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.stripe.model.StripeObject;
import com.stripe.net.StripeResponseGetter;

/** Returned when the bank account cannot be added due to previous suspicious activity. */
/** Returned when the payout method cannot be used due to suspicious activity. */
public final class BlockedByStripeException extends ApiException {
private static final long serialVersionUID = 2L;

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/exception/StripeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ public static StripeException parseV2Exception(
case "quota_exceeded":
return com.stripe.exception.QuotaExceededException.parse(
body, statusCode, requestId, responseGetter);
case "rate_limit":
return com.stripe.exception.RateLimitException.parse(
body, statusCode, requestId, responseGetter);
case "recipient_not_notifiable":
return com.stripe.exception.RecipientNotNotifiableException.parse(
body, statusCode, requestId, responseGetter);
Expand Down
92 changes: 72 additions & 20 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -2575,9 +2575,6 @@ public static class Settings extends StripeObject {
@SerializedName("branding")
Branding branding;

@SerializedName("capital")
Capital capital;

@SerializedName("card_issuing")
CardIssuing cardIssuing;

Expand Down Expand Up @@ -2725,23 +2722,6 @@ public void setLogoObject(File expandableObject) {
}
}

/**
* For more details about Capital, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Capital extends StripeObject {
/** Per-currency mapping of user-selected destination accounts used to pay out loans. */
@SerializedName("payout_destination")
Map<String, String> payoutDestination;

/** Per-currency mapping of all destination accounts eligible to receive loan payouts. */
@SerializedName("payout_destination_selector")
Map<String, List<String>> payoutDestinationSelector;
}

/**
* For more details about CardIssuing, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down Expand Up @@ -3081,13 +3061,85 @@ public static class Schedule extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaypayPayments extends StripeObject {
/** Additional files that are required to support the onboarding process of your business. */
@SerializedName("additional_files")
List<String> additionalFiles;

/**
* Whether your business sells digital content or not.
*
* <p>One of {@code digital_content}, or {@code other}.
*/
@SerializedName("goods_type")
String goodsType;

@SerializedName("site")
Site site;

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

@SerializedName("in_development")
InDevelopment inDevelopment;

@SerializedName("restricted")
Restricted restricted;

/**
* The status of your business's website.
*
* <p>One of {@code accessible}, {@code in_development}, or {@code restricted}.
*/
@SerializedName("type")
String type;

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

/**
* For more details about InDevelopment, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class InDevelopment extends StripeObject {
/** Field to indicate that the website password has been provided. */
@SerializedName("password_provided")
Boolean passwordProvided;

/** The username needed to access your business's website. */
@SerializedName("username")
String username;
}

/**
* For more details about Restricted, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Restricted extends StripeObject {
/** File explaining the payment flow for your business. */
@SerializedName("payment_flow_file")
String paymentFlowFile;
}
}
}

/**
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/com/stripe/model/AccountSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ public static class Features extends StripeObject {
Boolean externalAccountCollection;

/**
* Whether to allow creation of instant payouts. Defaults to {@code true} when {@code
* controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code
* false}.
* Whether to allow creation of instant payouts. The default value is {@code enabled} when
* Stripe is responsible for negative account balances, and {@code use_dashboard_rules}
* otherwise.
*/
@SerializedName("instant_payouts")
Boolean instantPayouts;
Expand Down Expand Up @@ -622,9 +622,9 @@ public static class Features extends StripeObject {
Boolean externalAccountCollection;

/**
* Whether to allow creation of instant payouts. Defaults to {@code true} when {@code
* controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code
* false}.
* Whether to allow creation of instant payouts. The default value is {@code enabled} when
* Stripe is responsible for negative account balances, and {@code use_dashboard_rules}
* otherwise.
*/
@SerializedName("instant_payouts")
Boolean instantPayouts;
Expand Down Expand Up @@ -986,9 +986,9 @@ public static class Features extends StripeObject {
Boolean externalAccountCollection;

/**
* Whether to allow creation of instant payouts. Defaults to {@code true} when {@code
* controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code
* false}.
* Whether to allow creation of instant payouts. The default value is {@code enabled} when
* Stripe is responsible for negative account balances, and {@code use_dashboard_rules}
* otherwise.
*/
@SerializedName("instant_payouts")
Boolean instantPayouts;
Expand Down
23 changes: 12 additions & 11 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId {
/**
* The balance that this transaction impacts.
*
* <p>One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}.
* <p>One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code
* risk_reserved}.
*/
@SerializedName("balance_type")
String balanceType;
Expand Down Expand Up @@ -137,11 +138,11 @@ public class BalanceTransaction extends ApiResource implements HasId {
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
* payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code
* refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@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
* refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code reserve_hold},
* {@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
* 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.
Expand All @@ -156,11 +157,11 @@ public class BalanceTransaction extends ApiResource implements HasId {
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
* payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code
* refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code
* stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code
* stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal},
* {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code
* transfer_refund}.
* refund_failure}, {@code reserve_hold}, {@code reserve_release}, {@code reserve_transaction},
* {@code reserved_funds}, {@code stripe_balance_payment_debit}, {@code
* stripe_balance_payment_debit_reversal}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code
* tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel},
* {@code transfer_failure}, or {@code transfer_refund}.
*/
@SerializedName("type")
String type;
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,7 @@ public static class ThreeDSecure extends StripeObject {
/**
* The version of 3D Secure that was used.
*
* <p>One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}.
* <p>One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}.
*/
@SerializedName("version")
String version;
Expand Down Expand Up @@ -2971,23 +2971,23 @@ public static class IdBankTransfer extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Ideal extends StripeObject {
/**
* The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code
* buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie},
* {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code
* revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code
* yoursafe}.
* The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank},
* {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code
* knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code
* regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot},
* or {@code yoursafe}.
*/
@SerializedName("bank")
String bank;

/**
* The Bank Identifier Code of the customer's bank.
*
* <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
* BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code
* KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code
* RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or
* {@code TRIONL2U}.
* <p>One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code
* BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code
* INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code
* NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code
* SNSBNL2A}, or {@code TRIONL2U}.
*/
@SerializedName("bic")
String bic;
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -1727,23 +1727,23 @@ public static class IdBankTransfer extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Ideal extends StripeObject {
/**
* The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code
* bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab},
* {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code
* regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot},
* or {@code yoursafe}.
* The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code
* asn_bank}, {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing},
* {@code knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank},
* {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code
* van_lanschot}, or {@code yoursafe}.
*/
@SerializedName("bank")
String bank;

/**
* The Bank Identifier Code of the customer's bank, if the bank was provided.
*
* <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
* BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code
* KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code
* RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or
* {@code TRIONL2U}.
* <p>One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code
* BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code
* INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code
* NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code
* SNSBNL2A}, or {@code TRIONL2U}.
*/
@SerializedName("bic")
String bic;
Expand Down
Loading
Loading