Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
b60d575
Update generated code for v2262 and
stripe-openapi[bot] May 13, 2026
2952085
Update generated code for v2263 and 5627059f43249637b6af1c0d3b5cbaa45…
stripe-openapi[bot] May 14, 2026
940b7da
Update generated code for v2264 and 52c9e8f324c9002533d92488eb3784777…
stripe-openapi[bot] May 14, 2026
e7810f2
Update generated code for v2265 and c1e5d6fabe06fd2f626d865acf640ebb6…
stripe-openapi[bot] May 14, 2026
2b1346c
Update generated code for v2266 and 9f2e574a668ddffc899c07160e9b540aa…
stripe-openapi[bot] May 15, 2026
799c3ae
Update generated code for v2269 and 90b299545de05ff13048c112577bdfb32…
stripe-openapi[bot] May 15, 2026
ea69775
Update generated code for v2270 and add4195cf003b11b8c28d6d2a9e6c6fa5…
stripe-openapi[bot] May 15, 2026
dea6f3d
Update generated code for v2271 and 104722335bd36cf4d60f025dc4b0d7150…
stripe-openapi[bot] May 15, 2026
4b38149
Update generated code for v2272 and 465cff036983d479dec172c65db53845e…
stripe-openapi[bot] May 18, 2026
cb92452
Update generated code for v2273 and 4df06b72321f83e0f11b36fc554eeb3aa…
stripe-openapi[bot] May 18, 2026
5880465
Add better example for accessing non-documented properties in a list …
xavdid May 20, 2026
784c845
Merge upstream and update generated code for v2273 and 0102be2b08962b…
stripe-openapi[bot] May 20, 2026
d1a92fb
Update generated code for v2273 and 2e266cdaf4a7328b80cf9bc2448dfca91…
stripe-openapi[bot] May 20, 2026
5757e73
Update generated code for v2274 and 2e266cdaf4a7328b80cf9bc2448dfca91…
stripe-openapi[bot] May 20, 2026
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
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6a1eb046657923602071d7707e99ce8a004a8216
2e266cdaf4a7328b80cf9bc2448dfca91811415c
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2261
v2274
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,32 @@ String secondaryValue =
.getAsString();
```

> [!NOTE]
> `.getRawJsonObject()` is only available on the top-level object returned by an API call. For most requests (like `.retrieve()` or `.create()`) you'll get the object itself. But for `.list()` calls, the top level object is a `List<T>`, so you can only access the raw json of an individual object by going through the list itself.
>
> ```java
> var cards = stripeClient
> .v1()
> .issuing()
> .cards()
> .list(params);
>
> // doesn't work:
> cards
> .getData()
> .get(0)
> .getRawJsonObject(); // null
>
> // instead, go through the list:
> cards
> .getRawJsonObject()
> .getAsJsonArray("data")
> .get(0)
> .getAsJsonObject()
> .getAsJsonPrimitive("undocumented-val")
> .getAsString(); // "some-val"
> ```

### Writing a plugin

If you're writing a plugin that uses the library, we'd appreciate it if you
Expand Down Expand Up @@ -259,7 +285,7 @@ Stripe.enableTelemetry = false;
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `25.2.0-beta.2`.
We would love for you to try these as we incrementally release new features and improve them based on your feedback.

To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-java/releases/) and then use it [installation steps above](#installation).
To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-java/releases/) and then use it [installation steps above](#installation).

> **Note**
> There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest public preview SDK.
Expand All @@ -269,6 +295,7 @@ Some preview features require a name and version to be set in the `Stripe-Versio
```java
Stripe.addBetaVersion("feature_beta", "v3");
```

### Private Preview SDKs

Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `25.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-java?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
Expand Down
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 @@ -750,6 +750,18 @@ public com.stripe.service.PaymentLinkService paymentLinks() {
return new com.stripe.service.PaymentLinkService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.paymentLocationCapabilities() is deprecated, use
* StripeClient.v1().paymentLocationCapabilities() instead. All functionality under it has
* been copied over to StripeClient.v1().paymentLocationCapabilities(). 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.PaymentLocationCapabilityService paymentLocationCapabilities() {
return new com.stripe.service.PaymentLocationCapabilityService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.paymentLocations() is deprecated, use
* StripeClient.v1().paymentLocations() instead. All functionality under it has been copied
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public final class EventDataClassLookup {
com.stripe.model.PaymentIntentAmountDetailsLineItem.class);
classLookup.put("payment_link", com.stripe.model.PaymentLink.class);
classLookup.put("payment_location", com.stripe.model.PaymentLocation.class);
classLookup.put(
"payment_location_capability", com.stripe.model.PaymentLocationCapability.class);
classLookup.put("payment_method", com.stripe.model.PaymentMethod.class);
classLookup.put("payment_method_balance", com.stripe.model.PaymentMethodBalance.class);
classLookup.put(
Expand Down
51 changes: 0 additions & 51 deletions src/main/java/com/stripe/model/InvoiceItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -818,61 +818,10 @@ public static class RateCardRateDetails extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ProrationDetails extends StripeObject {
@SerializedName("credited_items")
CreditedItems creditedItems;

/** Discount amounts applied when the proration was created. */
@SerializedName("discount_amounts")
List<InvoiceItem.ProrationDetails.DiscountAmount> discountAmounts;

/**
* For more details about CreditedItems, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CreditedItems extends StripeObject {
/**
* When {@code type} is {@code invoice_item}, the invoice item id for the debited invoice item
* corresponding to this credit proration.
*/
@SerializedName("invoice_item")
String invoiceItem;

@SerializedName("invoice_line_items")
InvoiceLineItems invoiceLineItems;

/**
* Whether the credit references a pending invoice item or one or more invoice line items on
* an invoice.
*
* <p>One of {@code invoice_item}, or {@code invoice_line_items}.
*/
@SerializedName("type")
String type;

/**
* For more details about InvoiceLineItems, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class InvoiceLineItems extends StripeObject {
/** The invoice id for the debited line item(s). */
@SerializedName("invoice")
String invoice;

/**
* IDs of the debited invoice line item(s) on the invoice that correspond to the credit
* proration.
*/
@SerializedName("invoice_line_items")
List<String> invoiceLineItems;
}
}

/**
* For more details about DiscountAmount, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down
134 changes: 134 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent> {
@SerializedName("advanced_feature_details")
AdvancedFeatureDetails advancedFeatureDetails;

/** Details about the agent that initiated the creation of this PaymentIntent. */
@SerializedName("agent_details")
AgentDetails agentDetails;
Expand All @@ -56,6 +59,15 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
@SerializedName("allocated_funds")
AllocatedFunds allocatedFunds;

/**
* The list of payment method types allowed for use with this payment. Stripe automatically
* returns compatible payment methods from this list in the {@code payment_method_types} field of
* the response, based on the other PaymentIntent parameters, such as {@code currency}, {@code
* amount}, and {@code customer}.
*/
@SerializedName("allowed_payment_method_types")
List<String> allowedPaymentMethodTypes;

/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much
* to charge in the <a href="https://docs.stripe.com/currencies#zero-decimal">smallest currency
Expand Down Expand Up @@ -1838,6 +1850,127 @@ public PaymentIntent verifyMicrodeposits(
return getResponseGetter().request(request, PaymentIntent.class);
}

/**
* For more details about AdvancedFeatureDetails, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AdvancedFeatureDetails extends StripeObject {
/** Timestamp at which the authorization will expire if not captured. */
@SerializedName("capture_before")
Long captureBefore;

@SerializedName("decremental_authorization")
DecrementalAuthorization decrementalAuthorization;

@SerializedName("incremental_authorization")
IncrementalAuthorization incrementalAuthorization;

@SerializedName("multicapture")
Multicapture multicapture;

@SerializedName("overcapture")
Overcapture overcapture;

@SerializedName("reauthorization")
Reauthorization reauthorization;

/** Timestamp at which the reauthorization window closes. */
@SerializedName("reauthorize_before")
Long reauthorizeBefore;

/**
* For more details about DecrementalAuthorization, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DecrementalAuthorization extends StripeObject {
/**
* Indicates whether the feature is supported.
*
* <p>One of {@code available}, or {@code unavailable}.
*/
@SerializedName("status")
String status;
}

/**
* For more details about IncrementalAuthorization, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class IncrementalAuthorization extends StripeObject {
/**
* Indicates whether the feature is supported.
*
* <p>One of {@code available}, or {@code unavailable}.
*/
@SerializedName("status")
String status;
}

/**
* For more details about Multicapture, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Multicapture extends StripeObject {
/**
* Indicates whether the feature is supported.
*
* <p>One of {@code available}, or {@code unavailable}.
*/
@SerializedName("status")
String status;
}

/**
* For more details about Overcapture, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Overcapture extends StripeObject {
/** The maximum amount that can be captured. */
@SerializedName("maximum_amount_capturable")
Long maximumAmountCapturable;

/**
* Indicates whether overcapture is supported.
*
* <p>One of {@code available}, or {@code unavailable}.
*/
@SerializedName("status")
String status;
}

/**
* For more details about Reauthorization, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Reauthorization extends StripeObject {
/**
* Indicates whether the feature is supported.
*
* <p>One of {@code available}, or {@code unavailable}.
*/
@SerializedName("status")
String status;
}
}

/**
* For more details about AgentDetails, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down Expand Up @@ -8521,6 +8654,7 @@ public PaymentIntent simulateCryptoDeposit(
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(advancedFeatureDetails, responseGetter);
trySetResponseGetter(agentDetails, responseGetter);
trySetResponseGetter(allocatedFunds, responseGetter);
trySetResponseGetter(amountDetails, responseGetter);
Expand Down
Loading
Loading