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
c250368ba89214c80bc8de3e4fc5d2094c5502cc
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2150
v2153
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
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/model/v2/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public final class EventDataClassLookup {
eventClassLookup.put(
"v2.core.account[defaults].updated",
com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class);
eventClassLookup.put(
"v2.core.account[future_requirements].updated",
com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class);
eventClassLookup.put(
"v2.core.account[identity].updated",
com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public final class EventNotificationClassLookup {
eventClassLookup.put(
"v2.core.account[defaults].updated",
com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class);
eventClassLookup.put(
"v2.core.account[future_requirements].updated",
com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class);
eventClassLookup.put(
"v2.core.account[identity].updated",
com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class);
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class GbBankAccount extends StripeObject implements HasId {
/** The alternative reference for this payout method, if it's a projected payout method. */
@SerializedName("alternative_reference")
AlternativeReference alternativeReference;

/**
* Whether this bank account object was archived. Bank account objects can be archived through the
* /archive API, and they will not be automatically archived by Stripe. Archived bank account
Expand Down Expand Up @@ -76,6 +80,25 @@ public class GbBankAccount extends StripeObject implements HasId {
@SerializedName("sort_code")
String sortCode;

/** The alternative reference for this payout method, if it's a projected payout method. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AlternativeReference extends StripeObject implements HasId {
/** The ID of the alternative resource being referenced. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

/**
* The type of the alternative reference (e.g., external_account for V1 external accounts).
*
* <p>One of {@code external_account}, or {@code payment_method}.
*/
@SerializedName("type")
String type;
}

/**
* Information around the status of Confirmation of Payee matching done on this bank account.
* Confirmation of Payee is a name matching service that must be done before making
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class UsBankAccount extends StripeObject implements HasId {
/** The alternative reference for this payout method, if it's a projected payout method. */
@SerializedName("alternative_reference")
AlternativeReference alternativeReference;

/** Whether this USBankAccount object was archived. */
@SerializedName("archived")
Boolean archived;
Expand Down Expand Up @@ -81,6 +85,25 @@ public class UsBankAccount extends StripeObject implements HasId {
@SerializedName("verification")
Verification verification;

/** The alternative reference for this payout method, if it's a projected payout method. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AlternativeReference extends StripeObject implements HasId {
/** The ID of the alternative resource being referenced. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

/**
* The type of the alternative reference (e.g., external_account for V1 external accounts).
*
* <p>One of {@code external_account}, or {@code payment_method}.
*/
@SerializedName("type")
String type;
}

/** The bank account verification details. */
@Getter
@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ public static class SepaBankAccount extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount extends StripeObject {
/** The address of the account holder. */
@SerializedName("account_holder_address")
AccountHolderAddress accountHolderAddress;

/** The name of the account holder. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The account number of the US Bank Account. */
@SerializedName("account_number")
String accountNumber;
Expand All @@ -208,6 +216,40 @@ public static class UsBankAccount extends StripeObject {
/** The swift code of the bank or financial institution. */
@SerializedName("swift_code")
String swiftCode;

/** The address of the account holder. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AccountHolderAddress extends StripeObject {
/** The city of the address. */
@SerializedName("city")
String city;

/** The country of the address. */
@SerializedName("country")
String country;

/** The first line of the address. */
@SerializedName("line1")
String line1;

/** The second line of the address. */
@SerializedName("line2")
String line2;

/** The postal / zip code of the address. */
@SerializedName("postal_code")
String postalCode;

/** The state of the address. */
@SerializedName("state")
String state;

/** The town of the address. */
@SerializedName("town")
String town;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class PayoutMethod extends StripeObject implements HasId {
/** The alternative reference for this payout method, if it's a projected payout method. */
@SerializedName("alternative_reference")
AlternativeReference alternativeReference;

/** A set of available payout speeds for this payout method. */
@SerializedName("available_payout_speeds")
List<String> availablePayoutSpeeds;
Expand Down Expand Up @@ -71,6 +75,25 @@ public class PayoutMethod extends StripeObject implements HasId {
@SerializedName("usage_status")
UsageStatus usageStatus;

/** The alternative reference for this payout method, if it's a projected payout method. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AlternativeReference extends StripeObject implements HasId {
/** The ID of the alternative resource being referenced. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

/**
* The type of the alternative reference (e.g., external_account for V1 external accounts).
*
* <p>One of {@code external_account}, or {@code payment_method}.
*/
@SerializedName("type")
String type;
}

/** The PayoutMethodBankAccount object details. */
@Getter
@Setter
Expand Down Expand Up @@ -147,6 +170,13 @@ public static class Card extends StripeObject {
@SerializedName("exp_year")
String expYear;

/**
* Uniquely identifies this particular card number. You can use this attribute to check whether
* two recipients who’ve signed up with you are using the same card number, for example.
*/
@SerializedName("fingerprint")
String fingerprint;

/** The last 4 digits of the card number. */
@SerializedName("last4")
String last4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class UsBankAccountUpdateParams extends ApiRequestParams {
Map<String, Object> extraParams;

/**
* The bank account's fedwire routing number can be provided for update it was were empty
* The bank account's Fedwire routing number can be provided for update if it was empty
* previously.
*/
@SerializedName("fedwire_routing_number")
Expand Down Expand Up @@ -85,7 +85,7 @@ public Builder putAllExtraParam(Map<String, Object> map) {
}

/**
* The bank account's fedwire routing number can be provided for update it was were empty
* The bank account's Fedwire routing number can be provided for update if it was empty
* previously.
*/
public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) {
Expand All @@ -94,7 +94,7 @@ public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) {
}

/**
* The bank account's fedwire routing number can be provided for update it was were empty
* The bank account's Fedwire routing number can be provided for update if it was empty
* previously.
*/
public Builder setFedwireRoutingNumber(EmptyParam fedwireRoutingNumber) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec
package com.stripe.service.v2.core;

import com.stripe.exception.RateLimitException;
import com.stripe.exception.StripeException;
import com.stripe.model.v2.core.AccountLink;
import com.stripe.net.ApiRequest;
Expand All @@ -21,15 +22,16 @@ public AccountLinkService(StripeResponseGetter responseGetter) {
* Creates an AccountLink object that includes a single-use URL that an account can use to access
* a Stripe-hosted flow for collecting or updating required information.
*/
public AccountLink create(AccountLinkCreateParams params) throws StripeException {
public AccountLink create(AccountLinkCreateParams params)
throws StripeException, RateLimitException {
return create(params, (RequestOptions) null);
}
/**
* Creates an AccountLink object that includes a single-use URL that an account can use to access
* a Stripe-hosted flow for collecting or updating required information.
*/
public AccountLink create(AccountLinkCreateParams params, RequestOptions options)
throws StripeException {
throws StripeException, RateLimitException {
String path = "/v2/core/account_links";
ApiRequest request =
new ApiRequest(
Expand Down
Loading
Loading