Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Read OpenAPI version
id: openapi
shell: bash
run: echo "version=$(< OPENAPI_VERSION)" >> "$GITHUB_OUTPUT"

- name: Setup Test Java Runtime
id: setup-test-jre
Expand Down Expand Up @@ -127,6 +131,7 @@ jobs:

- uses: stripe/openapi/actions/stripe-mock@master
with:
openapi_version: ${{ steps.openapi.outputs.version }}
# Used to determine if stripe-mock runs in beta mode
base: ${{ github.base_ref == 'private-preview' && 'beta' || github.ref_name == 'private-preview' && 'beta' || contains(github.ref_name, '-alpha.') && 'beta' || github.base_ref || github.ref_name }}
- name: Run test suite
Expand Down
63 changes: 63 additions & 0 deletions .hark/changes/2026-09-30_stripe-openapi_293bacd8.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Update generated code
pr_url: https://github.com/stripe/stripe-java/pull/2300
semver_level: major
is_stripe_api_change: true
---

* Add support for new resources `v2.data.QueryRun`, `v2.data.ReportRun`, `v2.data.Report`, `v2.data.Schema`, `v2.moneymanagement.EarnedCreditSimulation`, `v2.moneymanagement.EarnedCredit`, and `v2.provisioning.ResourceAccessConfiguration`
* Add support for `earned_credits` method on resource `v2.moneymanagement.EarnedCreditSimulation`
* Add support for `list` and `retrieve` methods on resources `v2.data.Report`, `v2.data.Schema`, and `v2.moneymanagement.EarnedCredit`
* Add support for `create` and `retrieve` methods on resources `v2.data.QueryRun` and `v2.data.ReportRun`
* Add support for `reveal_access_configuration` method on resource `v2.provisioning.Resource`
* Add support for `refresh_regulatory_receipt` method on resource `v2.moneymanagement.Transaction`
* Add support for `capitalFinancingManualPayment` on `AccountSessionCreateParams.components`
* ⚠️ Remove support for `authorizedContentSecurityPolicy`, `authorizedEndpoints`, `authorizedPermissions`, and `state` on `apps.Install`
* Add support for `financingDocuments` on `capital.FinancingOffer`
* Add support for `enabledPaymentTypes` and `overdueAmount` on `capital.FinancingSummary.details`
* Add support for `cardAccountUpdate` on `Charge.payment_method_details.card`
* Add support for `onBehalfOf` on `checkout.SessionCreateParams`
* Add support for `billingCycleAnchor` on `PaymentLink.subscription_data.trial_settings.end_behavior`, `PaymentLinkCreateParams.subscription_data.trial_settings.end_behavior`, `PaymentLinkUpdateParams.subscription_data.trial_settings.end_behavior`, `checkout.Session.items[].subscription.trial_settings.end_behavior`, `checkout.SessionCreateParams.items[].subscription.trial_settings.end_behavior`, and `checkout.SessionCreateParams.subscription_data.trial_settings.end_behavior`
* Add support for `paymentMethodPreselect` on `checkout.Session.saved_payment_method_options` and `checkout.SessionCreateParams.saved_payment_method_options`
* Add support for `es` on `CustomerTaxExemptionCreateParams` and `CustomerTaxExemption`
* ⚠️ Remove support for `financialActivity` on `financialconnections.Transaction.classifications[]`
* Add support for `enablementDetails` on `Invoice.automatic_tax` and `QuotePreviewInvoice.automatic_tax`
* Add support for new value `squads` on enum `issuing.CardCreateParams.crypto_wallet.type`
* Add support for new value `rerouted` on enums `PaymentAttemptRecordReportCanceledParams.reason`, `PaymentRecordReportPaymentAttemptCanceledParams.reason`, `PaymentRecordReportPaymentAttemptParams.canceled.reason`, and `PaymentRecordReportPaymentParams.canceled.reason`
* Add support for `returnCode` on `PaymentAttemptRecord.payment_method_details.us_bank_account` and `PaymentRecord.payment_method_details.us_bank_account`
* Add support for `requestCardAccountUpdate` on `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, and `PaymentIntentUpdateParams.payment_method_options.card`
* ⚠️ Remove support for `name` on `productcatalog.TrialOffer`
* Add support for `status` on `tax.FormListParams` and `tax.Form`
* Add support for `cardNotPresentTransactions`, `grossAmountOfTransactionsDecimal`, `monthlyVolumes`, `paymentTransactionsCount`, and `stateIncomeTaxWithheld` on `tax.Form.us_1099_k`
* Add support for `cashTips`, `currency`, and `federalIncomeTaxWithheld` on `tax.Form.us_1099_k`, `tax.Form.us_1099_misc`, and `tax.Form.us_1099_nec`
* Add support for `cropInsuranceProceeds`, `directSalesForResale`, `excessGoldenParachutePayments`, `fatcaFilingRequired`, `fishPurchasedForResale`, `fishingBoatProceeds`, `grossProceedsPaidToAnAttorney`, `medicalAndHealthCarePayments`, `nonqualifiedDeferredCompensation`, `otherIncome`, `rents`, `royalties`, `section409aDeferrals`, and `substitutePayments` on `tax.Form.us_1099_misc`
* Add support for `overtimeCompensation`, `stateIncome`, and `stateTaxWithheld` on `tax.Form.us_1099_misc` and `tax.Form.us_1099_nec`
* Add support for `directSalesIndicator`, `fatcaFilingRequirement`, and `nonemployeeCompensation` on `tax.Form.us_1099_nec`
* ⚠️ Remove support for `tamperState` on `terminal.ReaderListParams`
* ⚠️ Remove support for `configurations` on `v2.core.AccountLink.use_case.recipient_onboarding`, `v2.core.AccountLink.use_case.recipient_update`, `v2.core.AccountLinkCreateParams.use_case.recipient_onboarding`, and `v2.core.AccountLinkCreateParams.use_case.recipient_update`
* Add support for `ousd` on `v2.core.Account.configuration.money_manager.capabilities.business_storage.inbound`, `v2.core.Account.configuration.money_manager.capabilities.business_storage.outbound`, `v2.core.AccountCreateParams.configuration.money_manager.capabilities.business_storage.inbound`, `v2.core.AccountCreateParams.configuration.money_manager.capabilities.business_storage.outbound`, `v2.core.AccountUpdateParams.configuration.money_manager.capabilities.business_storage.inbound`, and `v2.core.AccountUpdateParams.configuration.money_manager.capabilities.business_storage.outbound`
* Add support for `origin` on `v2.core.vault.NetworkToken`
* Add support for `bic` on `v2.moneymanagement.FinancialAddress.bank_account.aba`, `v2.moneymanagement.FinancialAddress.bank_account.cpa`, `v2.moneymanagement.FinancialAddress.bank_account.iban`, and `v2.moneymanagement.FinancialAddress.bank_account.sort_code`
* Add support for `iban` on `v2.moneymanagement.FinancialAddress.bank_account.sort_code`
* Add support for `statementDescriptor` on `v2.moneymanagement.InboundTransferCreateParams` and `v2.moneymanagement.InboundTransfer`
* Add support for `networkFeeDetails` on `v2.moneymanagement.PayoutIntent.estimated_fees[]`
* ⚠️ Remove support for `archived` on `v2.moneymanagement.PayoutMethod.crypto_wallet`
* Add support for `networkDetails` on `v2.moneymanagement.ReceivedDebit.bank_transfer`
* Add support for `earnedCredit` on `v2.moneymanagement.Transaction.flow` and `v2.moneymanagement.TransactionEntry.transaction_details.flow`
* Add support for `regulatoryReceipt` on `v2.moneymanagement.Transaction`
* ⚠️ Remove support for `retryUntil` on `v2.payments.OffSessionPayment.retry_details`
* ⚠️ Remove support for `cvc` on `v2.payments.OffSessionPaymentCreateParams.payment_method_data.card`
* Add support for `fromResource` on `v2.moneymanagement.OutboundSetupIntentCreateParams`
* Add support for new value `storage.deposit_insurance_eligibility` on enums `v2.moneymanagement.FinancialAccountListParams.include` and `v2.moneymanagement.FinancialAccountRetrieveParams.include`
* Add support for new values `account_security`, `authentication`, `issuing`, `payout`, `scim`, `sso`, and `user_profile` on enum `v2.iam.ActivityLogListParams.actionGroups`
* Change type of `v2.core.vault.NetworkTokenCreateFromCredentialParams.card.origin` and `v2.core.vault.NetworkTokenCreateParams.card.origin` from `literal('card_on_file')` to `enum('card_on_file'|'wallet')`
* Change type of `v2.core.vault.NetworkTokenCreateFromCredentialParams.type` and `v2.core.vault.NetworkTokenCreateParams.type` from `literal('card')` to `enum('card')`
* Change type of `v2.core.vault.NetworkTokenGenerateCryptogramParams.type` from `literal('token_cryptogram')` to `enum('token_cryptogram')`
* ⚠️ Change type of `v2.billing.ContractCreateParams.pricing_lines[].pricing.price_details.pricing_overrides[].overwrite_price.unitAmount`, `v2.billing.ContractUpdateParams.pricing_line_actions[].add.pricing.price_details.pricing_overrides[].overwrite_price.unitAmount`, and `v2.billing.ContractUpdateParams.pricing_line_actions[].update.pricing.price_details.pricing_override_actions[].add.overwrite_price.unitAmount` from `string` to `decimal_string`
* ⚠️ Change type of `v2.billing.ContractCreateParams.pricing_overrides[].multiply_pricing.factor` from `string` to `decimal_string`
* Add support for `billingSettings` on `v2.billing.ContractUpdateParams`
* Add support for new values `business_storage.inbound.ousd` and `business_storage.outbound.ousd` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updatedCapability`
* ⚠️ Remove support for `account`, `evaluatedAt`, `fraudulentMerchant`, and `type` on `EventsV2SignalsAccountSignalFraudulentMerchantReadyEvent`
* Add support for event notifications `V2DataQueryRunCreatedEvent`, `V2DataQueryRunFailedEvent`, `V2DataQueryRunSucceededEvent`, and `V2DataQueryRunUpdatedEvent` with related object `v2.data.QueryRun`
* Add support for event notifications `V2DataReportRunCreatedEvent`, `V2DataReportRunFailedEvent`, `V2DataReportRunSucceededEvent`, and `V2DataReportRunUpdatedEvent` with related object `v2.data.ReportRun`
* Add support for event notification `V2MoneyManagementEarnedCreditSucceededEvent` with related object `v2.moneymanagement.EarnedCredit`
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2d13381d5dfd98ca6daaddeefc23711d41c7170a
adad04916772f880317eac10d8c026b401863f1d
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2516
v2526
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,6 +2,6 @@
package com.stripe;

final class ApiVersion {
public static final String CURRENT = "2026-09-23.preview";
public static final String CURRENT = "2026-09-30.preview";
public static final String CURRENT_MAJOR = "";
}
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 @@ -1230,6 +1230,18 @@ public com.stripe.service.TestHelpersService testHelpers() {
return new com.stripe.service.TestHelpersService(this.getResponseGetter());
}

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

/**
* @deprecated StripeClient.tokens() is deprecated, use StripeClient.v1().tokens() instead. All
* functionality under it has been copied over to StripeClient.v1().tokens(). See <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,14 @@
import com.stripe.events.V2CoreVaultNetworkTokenDeactivatedEventNotification;
import com.stripe.events.V2CoreVaultNetworkTokenDetailsUpdatedEventNotification;
import com.stripe.events.V2CoreVaultNetworkTokenSuspendedEventNotification;
import com.stripe.events.V2DataQueryRunCreatedEventNotification;
import com.stripe.events.V2DataQueryRunFailedEventNotification;
import com.stripe.events.V2DataQueryRunSucceededEventNotification;
import com.stripe.events.V2DataQueryRunUpdatedEventNotification;
import com.stripe.events.V2DataReportRunCreatedEventNotification;
import com.stripe.events.V2DataReportRunFailedEventNotification;
import com.stripe.events.V2DataReportRunSucceededEventNotification;
import com.stripe.events.V2DataReportRunUpdatedEventNotification;
import com.stripe.events.V2DataReportingQueryRunCreatedEventNotification;
import com.stripe.events.V2DataReportingQueryRunFailedEventNotification;
import com.stripe.events.V2DataReportingQueryRunSucceededEventNotification;
Expand All @@ -373,6 +381,7 @@
import com.stripe.events.V2MoneyManagementDebitDisputeFailedEventNotification;
import com.stripe.events.V2MoneyManagementDebitDisputeSubmittedEventNotification;
import com.stripe.events.V2MoneyManagementDebitDisputeSucceededEventNotification;
import com.stripe.events.V2MoneyManagementEarnedCreditSucceededEventNotification;
import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification;
import com.stripe.events.V2MoneyManagementFinancialAccountStatementCreatedEventNotification;
import com.stripe.events.V2MoneyManagementFinancialAccountStatementRestatedEventNotification;
Expand Down Expand Up @@ -2705,6 +2714,54 @@ public T onV2CoreVaultNetworkTokenSuspended(
return self();
}

public T onV2DataQueryRunCreated(
EventNotificationCallback<V2DataQueryRunCreatedEventNotification> callback) {
this.register("v2.data.query_run.created", callback);
return self();
}

public T onV2DataQueryRunFailed(
EventNotificationCallback<V2DataQueryRunFailedEventNotification> callback) {
this.register("v2.data.query_run.failed", callback);
return self();
}

public T onV2DataQueryRunSucceeded(
EventNotificationCallback<V2DataQueryRunSucceededEventNotification> callback) {
this.register("v2.data.query_run.succeeded", callback);
return self();
}

public T onV2DataQueryRunUpdated(
EventNotificationCallback<V2DataQueryRunUpdatedEventNotification> callback) {
this.register("v2.data.query_run.updated", callback);
return self();
}

public T onV2DataReportRunCreated(
EventNotificationCallback<V2DataReportRunCreatedEventNotification> callback) {
this.register("v2.data.report_run.created", callback);
return self();
}

public T onV2DataReportRunFailed(
EventNotificationCallback<V2DataReportRunFailedEventNotification> callback) {
this.register("v2.data.report_run.failed", callback);
return self();
}

public T onV2DataReportRunSucceeded(
EventNotificationCallback<V2DataReportRunSucceededEventNotification> callback) {
this.register("v2.data.report_run.succeeded", callback);
return self();
}

public T onV2DataReportRunUpdated(
EventNotificationCallback<V2DataReportRunUpdatedEventNotification> callback) {
this.register("v2.data.report_run.updated", callback);
return self();
}

public T onV2DataReportingQueryRunCreated(
EventNotificationCallback<V2DataReportingQueryRunCreatedEventNotification> callback) {
this.register("v2.data.reporting.query_run.created", callback);
Expand Down Expand Up @@ -2849,6 +2906,12 @@ public T onV2MoneyManagementDebitDisputeSucceeded(
return self();
}

public T onV2MoneyManagementEarnedCreditSucceeded(
EventNotificationCallback<V2MoneyManagementEarnedCreditSucceededEventNotification> callback) {
this.register("v2.money_management.earned_credit.succeeded", callback);
return self();
}

public T onV2MoneyManagementFinancialAccountCreated(
EventNotificationCallback<V2MoneyManagementFinancialAccountCreatedEventNotification>
callback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public static final class EventData {
* naver_pay_payments}, {@code oxxo_payments}, {@code p24_payments}, {@code payco_payments},
* {@code paynow_payments}, {@code stripe_balance.payouts}, {@code pay_by_bank_payments}, {@code
* promptpay_payments}, {@code revolut_pay_payments}, {@code samsung_pay_payments}, {@code
* sepa_bank_transfer_payments}, {@code sepa_debit_payments}, {@code sunbit_payments}, {@code
* swish_payments}, {@code twint_payments}, {@code us_bank_transfer_payments}, or {@code
* zip_payments}.
* satispay_payments}, {@code sepa_bank_transfer_payments}, {@code sepa_debit_payments}, {@code
* sequra_payments}, {@code sunbit_payments}, {@code swish_payments}, {@code twint_payments},
* {@code us_bank_transfer_payments}, or {@code zip_payments}.
*/
@SerializedName("updated_capability")
String updatedCapability;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public static final class EventData {
* Open Enum. The capability which had its status updated.
*
* <p>One of {@code business_storage.inbound.cad}, {@code business_storage.inbound.eur}, {@code
* business_storage.inbound.gbp}, {@code business_storage.inbound.usd}, {@code
* business_storage.inbound.usdc}, {@code business_storage.outbound.cad}, {@code
* business_storage.outbound.eur}, {@code business_storage.outbound.gbp}, {@code
* business_storage.inbound.gbp}, {@code business_storage.inbound.ousd}, {@code
* business_storage.inbound.usd}, {@code business_storage.inbound.usdc}, {@code
* business_storage.outbound.cad}, {@code business_storage.outbound.eur}, {@code
* business_storage.outbound.gbp}, {@code business_storage.outbound.ousd}, {@code
* business_storage.outbound.usd}, {@code business_storage.outbound.usdc}, {@code
* consumer_storage.inbound.usd}, {@code consumer_storage.inbound.usdc}, {@code
* consumer_storage.outbound.usd}, {@code consumer_storage.outbound.usdc}, {@code
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/stripe/events/V2DataQueryRunCreatedEvent.java
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.Event;
import com.stripe.model.v2.core.Event.RelatedObject;
import com.stripe.model.v2.data.QueryRun;
import lombok.Getter;

@Getter
public final class V2DataQueryRunCreatedEvent 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 QueryRun fetchRelatedObject() throws StripeException {
return (QueryRun) super.fetchRelatedObject(this.relatedObject);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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.Event.RelatedObject;
import com.stripe.model.v2.core.EventNotification;
import com.stripe.model.v2.data.QueryRun;
import lombok.Getter;

@Getter
public final class V2DataQueryRunCreatedEventNotification 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 QueryRun fetchRelatedObject() throws StripeException {
return (QueryRun) super.fetchRelatedObject(this.relatedObject);
}
/** Retrieve the corresponding full event from the Stripe API. */
@Override
public V2DataQueryRunCreatedEvent fetchEvent() throws StripeException {
return (V2DataQueryRunCreatedEvent) super.fetchEvent();
}
}
22 changes: 22 additions & 0 deletions src/main/java/com/stripe/events/V2DataQueryRunFailedEvent.java
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.Event;
import com.stripe.model.v2.core.Event.RelatedObject;
import com.stripe.model.v2.data.QueryRun;
import lombok.Getter;

@Getter
public final class V2DataQueryRunFailedEvent 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 QueryRun fetchRelatedObject() throws StripeException {
return (QueryRun) super.fetchRelatedObject(this.relatedObject);
}
}
Loading
Loading