From 9d5834acf4de93f979d6556cf5f4761fb24d5388 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 4 May 2026 19:33:52 +0000
Subject: [PATCH 1/3] Update generated code for v2255 and
---
CODEGEN_VERSION | 2 +-
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/StripeClient.java | 12 +
.../java/com/stripe/model/Capability.java | 41 ++
.../com/stripe/model/ConfirmationToken.java | 56 ++-
.../stripe/model/EventDataClassLookup.java | 1 +
.../java/com/stripe/model/InvoiceItem.java | 51 +++
.../com/stripe/model/PaymentLocation.java | 162 ++++++++
.../java/com/stripe/model/PaymentMethod.java | 59 ++-
.../com/stripe/model/issuing/Dispute.java | 93 +++++
.../model/sharedpayment/GrantedToken.java | 56 ++-
.../com/stripe/param/AccountCreateParams.java | 173 +++++++-
.../com/stripe/param/AccountUpdateParams.java | 173 +++++++-
.../param/ConfirmationTokenCreateParams.java | 97 +++++
.../CustomerListPaymentMethodsParams.java | 3 +
.../CustomerPaymentMethodListParams.java | 3 +
.../param/PaymentIntentConfirmParams.java | 99 +++++
.../param/PaymentIntentCreateParams.java | 99 +++++
.../param/PaymentIntentUpdateParams.java | 105 +++++
.../param/PaymentLocationCreateParams.java | 382 ++++++++++++++++++
.../param/PaymentMethodCreateParams.java | 93 +++++
.../stripe/param/PaymentMethodListParams.java | 3 +
.../param/SetupIntentConfirmParams.java | 96 +++++
.../stripe/param/SetupIntentCreateParams.java | 99 +++++
.../stripe/param/SetupIntentUpdateParams.java | 105 +++++
.../RequestedSessionConfirmParams.java | 50 +++
.../service/PaymentLocationService.java | 37 ++
.../java/com/stripe/service/V1Services.java | 4 +
28 files changed, 2125 insertions(+), 31 deletions(-)
create mode 100644 src/main/java/com/stripe/model/PaymentLocation.java
create mode 100644 src/main/java/com/stripe/param/PaymentLocationCreateParams.java
create mode 100644 src/main/java/com/stripe/service/PaymentLocationService.java
diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index c82dcaeaa3f..575860e41ec 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-1263d72c2687be8ce737cfb363690b8da0a0d552
\ No newline at end of file
+f0187e75a5c663247a7e8d02c02e8f3c69c9b144
\ No newline at end of file
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 1ae2e8d30e4..bb151480971 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2254
\ No newline at end of file
+v2255
\ No newline at end of file
diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java
index c17b6823a3f..8e3e5c9fac0 100644
--- a/src/main/java/com/stripe/StripeClient.java
+++ b/src/main/java/com/stripe/StripeClient.java
@@ -693,6 +693,18 @@ public com.stripe.service.PaymentLinkService paymentLinks() {
return new com.stripe.service.PaymentLinkService(this.getResponseGetter());
}
+ /**
+ * @deprecated StripeClient.paymentLocations() is deprecated, use
+ * StripeClient.v1().paymentLocations() instead. All functionality under it has been copied
+ * over to StripeClient.v1().paymentLocations(). See migration
+ * guide for more on this and tips on migrating to the new v1 namespace.
+ */
+ @Deprecated
+ public com.stripe.service.PaymentLocationService paymentLocations() {
+ return new com.stripe.service.PaymentLocationService(this.getResponseGetter());
+ }
+
/**
* @deprecated StripeClient.paymentMethodConfigurations() is deprecated, use
* StripeClient.v1().paymentMethodConfigurations() instead. All functionality under it has
diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java
index 119b3b5de09..4638164624d 100644
--- a/src/main/java/com/stripe/model/Capability.java
+++ b/src/main/java/com/stripe/model/Capability.java
@@ -48,6 +48,9 @@ public class Capability extends ApiResource implements HasId {
@SerializedName("object")
String object;
+ @SerializedName("protections")
+ Protections protections;
+
/** Whether the capability has been requested. */
@SerializedName("requested")
Boolean requested;
@@ -326,6 +329,43 @@ public static class Errors extends StripeObject {
}
}
+ /**
+ * For more details about Protections, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Protections extends StripeObject {
+ @SerializedName("psp_migration")
+ PspMigration pspMigration;
+
+ /**
+ * For more details about PspMigration, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PspMigration extends StripeObject {
+ /** Time at which the protection expires. Measured in seconds since the Unix epoch. */
+ @SerializedName("expires_at")
+ Long expiresAt;
+
+ /** Time at which the protection was requested. Measured in seconds since the Unix epoch. */
+ @SerializedName("requested_at")
+ Long requestedAt;
+
+ /**
+ * The status of the capability protection.
+ *
+ *
One of {@code active}, {@code disrupted}, {@code expired}, or {@code inactive}.
+ */
+ @SerializedName("status")
+ String status;
+ }
+ }
+
/**
* For more details about Requirements, please refer to the API Reference.
@@ -520,6 +560,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(account, responseGetter);
trySetResponseGetter(futureRequirements, responseGetter);
+ trySetResponseGetter(protections, responseGetter);
trySetResponseGetter(requirements, responseGetter);
}
}
diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java
index a8d5f392476..cf6ac32b313 100644
--- a/src/main/java/com/stripe/model/ConfirmationToken.java
+++ b/src/main/java/com/stripe/model/ConfirmationToken.java
@@ -350,6 +350,9 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("fpx")
Fpx fpx;
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
@SerializedName("giropay")
Giropay giropay;
@@ -473,14 +476,14 @@ public static class PaymentMethodPreview extends StripeObject {
* {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code
* bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code
* card_present}, {@code cashapp}, {@code crypto}, {@code custom}, {@code customer_balance},
- * {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, {@code grabpay}, {@code
- * id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna},
- * {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code
- * multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24}, {@code
- * pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto},
- * {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code
- * samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code
- * stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
+ * {@code eps}, {@code fpx}, {@code gift_card}, {@code giropay}, {@code gopay}, {@code grabpay},
+ * {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code
+ * klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay},
+ * {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24},
+ * {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code
+ * payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay},
+ * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort},
+ * {@code stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
* us_bank_account}, {@code wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
@@ -1738,6 +1741,43 @@ public static class Fpx extends StripeObject {
String bank;
}
+ /**
+ * For more details about GiftCard, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard extends StripeObject {
+ /**
+ * The brand of the gift card.
+ *
+ *
One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}.
+ */
+ @SerializedName("brand")
+ String brand;
+
+ /** The expiration month of the gift card. */
+ @SerializedName("exp_month")
+ Long expMonth;
+
+ /** The expiration year of the gift card. */
+ @SerializedName("exp_year")
+ Long expYear;
+
+ /** Uniquely identifies the gift card. */
+ @SerializedName("fingerprint")
+ String fingerprint;
+
+ /** The first six digits of the gift card number. */
+ @SerializedName("first6")
+ String first6;
+
+ /** The last four digits of the gift card number. */
+ @SerializedName("last4")
+ String last4;
+ }
+
/**
* For more details about Giropay, please refer to the API
* Reference.
diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java
index e5ba41dcdf3..33a084b8443 100644
--- a/src/main/java/com/stripe/model/EventDataClassLookup.java
+++ b/src/main/java/com/stripe/model/EventDataClassLookup.java
@@ -71,6 +71,7 @@ public final class EventDataClassLookup {
"payment_intent_amount_details_line_item",
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_method", com.stripe.model.PaymentMethod.class);
classLookup.put("payment_method_balance", com.stripe.model.PaymentMethodBalance.class);
classLookup.put(
diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java
index c77b5e2ec52..d4b4323c64f 100644
--- a/src/main/java/com/stripe/model/InvoiceItem.java
+++ b/src/main/java/com/stripe/model/InvoiceItem.java
@@ -818,10 +818,61 @@ 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 discountAmounts;
+ /**
+ * For more details about CreditedItems, please refer to the API Reference.
+ */
+ @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.
+ *
+ * One of {@code invoice_item}, or {@code invoice_line_items}.
+ */
+ @SerializedName("type")
+ String type;
+
+ /**
+ * For more details about InvoiceLineItems, please refer to the API Reference.
+ */
+ @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 invoiceLineItems;
+ }
+ }
+
/**
* For more details about DiscountAmount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentLocation.java b/src/main/java/com/stripe/model/PaymentLocation.java
new file mode 100644
index 00000000000..073fda4a5cc
--- /dev/null
+++ b/src/main/java/com/stripe/model/PaymentLocation.java
@@ -0,0 +1,162 @@
+// File generated from our OpenAPI spec
+package com.stripe.model;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.exception.StripeException;
+import com.stripe.net.ApiRequest;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.net.ApiResource;
+import com.stripe.net.BaseAddress;
+import com.stripe.net.RequestOptions;
+import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.PaymentLocationCreateParams;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+/** A Payment Location represents a physical location where payments take place. */
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+public class PaymentLocation extends ApiResource implements HasId {
+ @SerializedName("address")
+ Address address;
+
+ /** Identification numbers associated with the location. */
+ @SerializedName("business_registration")
+ BusinessRegistration businessRegistration;
+
+ /**
+ * The capability settings for the location. Only applicable for locations with requested Payment
+ * Location Capabilities.
+ */
+ @SerializedName("capability_settings")
+ CapabilitySettings capabilitySettings;
+
+ /** The display name of the location. */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** Unique identifier for the object. */
+ @Getter(onMethod_ = {@Override})
+ @SerializedName("id")
+ String id;
+
+ /**
+ * If the object exists in live mode, the value is {@code true}. If the object exists in test
+ * mode, the value is {@code false}.
+ */
+ @SerializedName("livemode")
+ Boolean livemode;
+
+ /**
+ * String representing the object's type. Objects of the same type share the same value.
+ *
+ * Equal to {@code payment_location}.
+ */
+ @SerializedName("object")
+ String object;
+
+ /** Create a Payment Location. */
+ public static PaymentLocation create(Map params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Create a Payment Location. */
+ public static PaymentLocation create(Map params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/payment_locations";
+ ApiRequest request =
+ new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
+ return getGlobalResponseGetter().request(request, PaymentLocation.class);
+ }
+
+ /** Create a Payment Location. */
+ public static PaymentLocation create(PaymentLocationCreateParams params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+
+ /** Create a Payment Location. */
+ public static PaymentLocation create(PaymentLocationCreateParams params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/payment_locations";
+ ApiResource.checkNullTypedParams(path, params);
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return getGlobalResponseGetter().request(request, PaymentLocation.class);
+ }
+
+ /**
+ * For more details about BusinessRegistration, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BusinessRegistration extends StripeObject {
+ /**
+ * 14-digit SIRET (Système d'identification du répertoire des établissements) number for the
+ * location.
+ */
+ @SerializedName("siret")
+ String siret;
+ }
+
+ /**
+ * For more details about CapabilitySettings, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CapabilitySettings extends StripeObject {
+ /** Settings for Conecs French meal voucher capability. */
+ @SerializedName("fr_meal_vouchers_conecs_payments")
+ FrMealVouchersConecsPayments frMealVouchersConecsPayments;
+
+ /**
+ * For more details about FrMealVouchersConecsPayments, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FrMealVouchersConecsPayments extends StripeObject {
+ /** Supported meal voucher issuers. */
+ @SerializedName("supported_issuers")
+ SupportedIssuers supportedIssuers;
+
+ /**
+ * For more details about SupportedIssuers, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class SupportedIssuers extends StripeObject {
+ /** Supported meal voucher issuers for card payments. */
+ @SerializedName("card")
+ List card;
+
+ /** Supported meal voucher issuers for card present payments. */
+ @SerializedName("card_present")
+ List cardPresent;
+ }
+ }
+ }
+
+ @Override
+ public void setResponseGetter(StripeResponseGetter responseGetter) {
+ super.setResponseGetter(responseGetter);
+ trySetResponseGetter(address, responseGetter);
+ trySetResponseGetter(businessRegistration, responseGetter);
+ trySetResponseGetter(capabilitySettings, responseGetter);
+ }
+}
diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java
index 8270aaa0aa1..65b93191d11 100644
--- a/src/main/java/com/stripe/model/PaymentMethod.java
+++ b/src/main/java/com/stripe/model/PaymentMethod.java
@@ -124,6 +124,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStoreAPI
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard extends StripeObject {
+ /**
+ * The brand of the gift card.
+ *
+ *
One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}.
+ */
+ @SerializedName("brand")
+ String brand;
+
+ /** The expiration month of the gift card. */
+ @SerializedName("exp_month")
+ Long expMonth;
+
+ /** The expiration year of the gift card. */
+ @SerializedName("exp_year")
+ Long expYear;
+
+ /** Uniquely identifies the gift card. */
+ @SerializedName("fingerprint")
+ String fingerprint;
+
+ /** The first six digits of the gift card number. */
+ @SerializedName("first6")
+ String first6;
+
+ /** The last four digits of the gift card number. */
+ @SerializedName("last4")
+ String last4;
+ }
+
/**
* For more details about Giropay, please refer to the API
* Reference.
@@ -3036,6 +3076,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(customerBalance, responseGetter);
trySetResponseGetter(eps, responseGetter);
trySetResponseGetter(fpx, responseGetter);
+ trySetResponseGetter(giftCard, responseGetter);
trySetResponseGetter(giropay, responseGetter);
trySetResponseGetter(gopay, responseGetter);
trySetResponseGetter(grabpay, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Dispute.java b/src/main/java/com/stripe/model/issuing/Dispute.java
index 6f9f738cf73..5a27fd2e989 100644
--- a/src/main/java/com/stripe/model/issuing/Dispute.java
+++ b/src/main/java/com/stripe/model/issuing/Dispute.java
@@ -104,6 +104,13 @@ public class Dispute extends ApiResource
@SerializedName("metadata")
Map metadata;
+ /**
+ * Incoming information from the card network for this dispute. Includes the acquiring merchant's
+ * initial response, pre-arbitration submission, and pre-arbitration response to the dispute.
+ */
+ @SerializedName("network_lifecycle")
+ NetworkLifecycle networkLifecycle;
+
/**
* String representing the object's type. Objects of the same type share the same value.
*
@@ -1168,6 +1175,91 @@ public void setAdditionalDocumentationObject(File expandableObject) {
}
}
+ /**
+ * For more details about NetworkLifecycle, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class NetworkLifecycle extends StripeObject {
+ /** Information related to the acquiring merchant's initial response to this dispute. */
+ @SerializedName("dispute_response")
+ DisputeResponse disputeResponse;
+
+ /**
+ * Information related to the acquiring merchant's pre-arbitration response for this dispute.
+ */
+ @SerializedName("pre_arbitration_response")
+ PreArbitrationResponse preArbitrationResponse;
+
+ /**
+ * Information related to the acquiring merchant's pre-arbitration submission for this dispute.
+ */
+ @SerializedName("pre_arbitration_submission")
+ PreArbitrationSubmission preArbitrationSubmission;
+
+ /**
+ * For more details about DisputeResponse, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DisputeResponse extends StripeObject {
+ /** Error message if processing the acquiring merchant's initial dispute response failed. */
+ @SerializedName("error")
+ String error;
+
+ /**
+ * Array of File ids containing evidence the
+ * acquiring merchant provided in support of their initial dispute response.
+ */
+ @SerializedName("merchant_evidence_files")
+ List merchantEvidenceFiles;
+ }
+
+ /**
+ * For more details about PreArbitrationResponse, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PreArbitrationResponse extends StripeObject {
+ /** Error message if processing the acquiring merchant's pre-arbitration response failed. */
+ @SerializedName("error")
+ String error;
+
+ /**
+ * Array of File ids containing evidence the
+ * acquiring merchant provided with their pre-arbitration response.
+ */
+ @SerializedName("merchant_evidence_files")
+ List merchantEvidenceFiles;
+ }
+
+ /**
+ * For more details about PreArbitrationSubmission, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PreArbitrationSubmission extends StripeObject {
+ /** Error message if processing the acquiring merchant's pre-arbitration submission failed. */
+ @SerializedName("error")
+ String error;
+
+ /**
+ * Array of File ids containing evidence the
+ * acquiring merchant provided with their pre-arbitration submission.
+ */
+ @SerializedName("merchant_evidence_files")
+ List merchantEvidenceFiles;
+ }
+ }
+
/**
* For more details about Treasury, please refer to the API
* Reference.
@@ -1195,6 +1287,7 @@ public static class Treasury extends StripeObject {
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(evidence, responseGetter);
+ trySetResponseGetter(networkLifecycle, responseGetter);
trySetResponseGetter(transaction, responseGetter);
trySetResponseGetter(treasury, responseGetter);
}
diff --git a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java
index 193b3a4f8a3..17037bbb19b 100644
--- a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java
+++ b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java
@@ -224,6 +224,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("fpx")
Fpx fpx;
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
@SerializedName("giropay")
Giropay giropay;
@@ -347,14 +350,14 @@ public static class PaymentMethodDetails extends StripeObject {
* {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code
* bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code
* card_present}, {@code cashapp}, {@code crypto}, {@code custom}, {@code customer_balance},
- * {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, {@code grabpay}, {@code
- * id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna},
- * {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code
- * multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24}, {@code
- * pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto},
- * {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code
- * samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code
- * stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
+ * {@code eps}, {@code fpx}, {@code gift_card}, {@code giropay}, {@code gopay}, {@code grabpay},
+ * {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code
+ * klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay},
+ * {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24},
+ * {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code
+ * payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay},
+ * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort},
+ * {@code stripe_balance}, {@code sunbit}, {@code swish}, {@code twint}, {@code upi}, {@code
* us_bank_account}, {@code wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
@@ -1154,6 +1157,43 @@ public static class Fpx extends StripeObject {
String bank;
}
+ /**
+ * For more details about GiftCard, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard extends StripeObject {
+ /**
+ * The brand of the gift card.
+ *
+ * One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}.
+ */
+ @SerializedName("brand")
+ String brand;
+
+ /** The expiration month of the gift card. */
+ @SerializedName("exp_month")
+ Long expMonth;
+
+ /** The expiration year of the gift card. */
+ @SerializedName("exp_year")
+ Long expYear;
+
+ /** Uniquely identifies the gift card. */
+ @SerializedName("fingerprint")
+ String fingerprint;
+
+ /** The first six digits of the gift card number. */
+ @SerializedName("first6")
+ String first6;
+
+ /** The last four digits of the gift card number. */
+ @SerializedName("last4")
+ String last4;
+ }
+
/**
* For more details about Giropay, please refer to the API
* Reference.
diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java
index e50af5d67e6..55fdb2c4cea 100644
--- a/src/main/java/com/stripe/param/AccountCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountCreateParams.java
@@ -3821,6 +3821,10 @@ public static class CardPayments {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** Protections to apply to this capability. */
+ @SerializedName("protections")
+ Protections protections;
+
/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
@@ -3829,8 +3833,10 @@ public static class CardPayments {
@SerializedName("requested")
Boolean requested;
- private CardPayments(Map extraParams, Boolean requested) {
+ private CardPayments(
+ Map extraParams, Protections protections, Boolean requested) {
this.extraParams = extraParams;
+ this.protections = protections;
this.requested = requested;
}
@@ -3841,12 +3847,14 @@ public static Builder builder() {
public static class Builder {
private Map extraParams;
+ private Protections protections;
+
private Boolean requested;
/** Finalize and obtain parameter instance from this builder. */
public AccountCreateParams.Capabilities.CardPayments build() {
return new AccountCreateParams.Capabilities.CardPayments(
- this.extraParams, this.requested);
+ this.extraParams, this.protections, this.requested);
}
/**
@@ -3877,6 +3885,13 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /** Protections to apply to this capability. */
+ public Builder setProtections(
+ AccountCreateParams.Capabilities.CardPayments.Protections protections) {
+ this.protections = protections;
+ return this;
+ }
+
/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
@@ -3887,6 +3902,160 @@ public Builder setRequested(Boolean requested) {
return this;
}
}
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Protections {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Required. Protection for connected accounts migrating from another PSP.
+ */
+ @SerializedName("psp_migration")
+ PspMigration pspMigration;
+
+ private Protections(Map extraParams, PspMigration pspMigration) {
+ this.extraParams = extraParams;
+ this.pspMigration = pspMigration;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private PspMigration pspMigration;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountCreateParams.Capabilities.CardPayments.Protections build() {
+ return new AccountCreateParams.Capabilities.CardPayments.Protections(
+ this.extraParams, this.pspMigration);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountCreateParams.Capabilities.CardPayments.Protections#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountCreateParams.Capabilities.CardPayments.Protections#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Required. Protection for connected accounts migrating from another
+ * PSP.
+ */
+ public Builder setPspMigration(
+ AccountCreateParams.Capabilities.CardPayments.Protections.PspMigration pspMigration) {
+ this.pspMigration = pspMigration;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PspMigration {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. Passing true requests the protection. */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private PspMigration(Map extraParams, Boolean requested) {
+ this.extraParams = extraParams;
+ this.requested = requested;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Boolean requested;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountCreateParams.Capabilities.CardPayments.Protections.PspMigration build() {
+ return new AccountCreateParams.Capabilities.CardPayments.Protections.PspMigration(
+ this.extraParams, this.requested);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * AccountCreateParams.Capabilities.CardPayments.Protections.PspMigration#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * AccountCreateParams.Capabilities.CardPayments.Protections.PspMigration#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. Passing true requests the protection. */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java
index 7b8dae58917..3c8e09b2b9e 100644
--- a/src/main/java/com/stripe/param/AccountUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountUpdateParams.java
@@ -3919,6 +3919,10 @@ public static class CardPayments {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** Protections to apply to this capability. */
+ @SerializedName("protections")
+ Protections protections;
+
/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
@@ -3927,8 +3931,10 @@ public static class CardPayments {
@SerializedName("requested")
Boolean requested;
- private CardPayments(Map extraParams, Boolean requested) {
+ private CardPayments(
+ Map extraParams, Protections protections, Boolean requested) {
this.extraParams = extraParams;
+ this.protections = protections;
this.requested = requested;
}
@@ -3939,12 +3945,14 @@ public static Builder builder() {
public static class Builder {
private Map extraParams;
+ private Protections protections;
+
private Boolean requested;
/** Finalize and obtain parameter instance from this builder. */
public AccountUpdateParams.Capabilities.CardPayments build() {
return new AccountUpdateParams.Capabilities.CardPayments(
- this.extraParams, this.requested);
+ this.extraParams, this.protections, this.requested);
}
/**
@@ -3975,6 +3983,13 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /** Protections to apply to this capability. */
+ public Builder setProtections(
+ AccountUpdateParams.Capabilities.CardPayments.Protections protections) {
+ this.protections = protections;
+ return this;
+ }
+
/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
@@ -3985,6 +4000,160 @@ public Builder setRequested(Boolean requested) {
return this;
}
}
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Protections {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its parent
+ * instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * Required. Protection for connected accounts migrating from another PSP.
+ */
+ @SerializedName("psp_migration")
+ PspMigration pspMigration;
+
+ private Protections(Map extraParams, PspMigration pspMigration) {
+ this.extraParams = extraParams;
+ this.pspMigration = pspMigration;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private PspMigration pspMigration;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountUpdateParams.Capabilities.CardPayments.Protections build() {
+ return new AccountUpdateParams.Capabilities.CardPayments.Protections(
+ this.extraParams, this.pspMigration);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountUpdateParams.Capabilities.CardPayments.Protections#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link AccountUpdateParams.Capabilities.CardPayments.Protections#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * Required. Protection for connected accounts migrating from another
+ * PSP.
+ */
+ public Builder setPspMigration(
+ AccountUpdateParams.Capabilities.CardPayments.Protections.PspMigration pspMigration) {
+ this.pspMigration = pspMigration;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class PspMigration {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field
+ * (serialized) name in this param object. Effectively, this map is flattened to its
+ * parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. Passing true requests the protection. */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private PspMigration(Map extraParams, Boolean requested) {
+ this.extraParams = extraParams;
+ this.requested = requested;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Boolean requested;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public AccountUpdateParams.Capabilities.CardPayments.Protections.PspMigration build() {
+ return new AccountUpdateParams.Capabilities.CardPayments.Protections.PspMigration(
+ this.extraParams, this.requested);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * AccountUpdateParams.Capabilities.CardPayments.Protections.PspMigration#extraParams}
+ * for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the
+ * original map. See {@link
+ * AccountUpdateParams.Capabilities.CardPayments.Protections.PspMigration#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. Passing true requests the protection. */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+ }
}
@Getter
diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
index 8217fc29aac..f976267170e 100644
--- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
+++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
@@ -357,6 +357,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -695,6 +702,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -761,6 +769,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -854,6 +863,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -969,6 +980,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -1225,6 +1237,16 @@ public Builder setFpx(ConfirmationTokenCreateParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(
+ ConfirmationTokenCreateParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -3336,6 +3358,78 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ConfirmationTokenCreateParams.PaymentMethodData.GiftCard build() {
+ return new ConfirmationTokenCreateParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.GiftCard#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.GiftCard#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -6914,6 +7008,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
index 0d88f42003e..5961f09c913 100644
--- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
+++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
@@ -297,6 +297,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
index 73ffa3c3048..1a73ff1aa2c 100644
--- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
+++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
@@ -297,6 +297,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 6378daf5044..2d07457ac66 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -16327,6 +16327,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -16665,6 +16672,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -16731,6 +16739,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -16824,6 +16833,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -16939,6 +16950,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -17195,6 +17207,15 @@ public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(PaymentIntentConfirmParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -19295,6 +19316,78 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodData.GiftCard build() {
+ return new PaymentIntentConfirmParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.GiftCard#extraParams} for
+ * the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.GiftCard#extraParams} for
+ * the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -22859,6 +22952,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
@@ -49479,6 +49575,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index aef263c7d4f..3df332d9d09 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -16826,6 +16826,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -17164,6 +17171,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -17230,6 +17238,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -17323,6 +17332,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -17438,6 +17449,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -17691,6 +17703,15 @@ public Builder setFpx(PaymentIntentCreateParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(PaymentIntentCreateParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -19782,6 +19803,78 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodData.GiftCard build() {
+ return new PaymentIntentCreateParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentCreateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -23344,6 +23437,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
@@ -50127,6 +50223,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
index 004b259907d..02958767e1b 100644
--- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
@@ -17770,6 +17770,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -18108,6 +18115,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -18174,6 +18182,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -18267,6 +18276,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -18382,6 +18393,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -18635,6 +18647,15 @@ public Builder setFpx(PaymentIntentUpdateParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(PaymentIntentUpdateParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -20834,6 +20855,84 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ Object giftCard;
+
+ private GiftCard(Map extraParams, Object giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodData.GiftCard build() {
+ return new PaymentIntentUpdateParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(EmptyParam giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -24501,6 +24600,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
@@ -52226,6 +52328,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/PaymentLocationCreateParams.java b/src/main/java/com/stripe/param/PaymentLocationCreateParams.java
new file mode 100644
index 00000000000..daa48e8af86
--- /dev/null
+++ b/src/main/java/com/stripe/param/PaymentLocationCreateParams.java
@@ -0,0 +1,382 @@
+// File generated from our OpenAPI spec
+package com.stripe.param;
+
+import com.google.gson.annotations.SerializedName;
+import com.stripe.net.ApiRequestParams;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+@Getter
+@EqualsAndHashCode(callSuper = false)
+public class PaymentLocationCreateParams extends ApiRequestParams {
+ /** Required. The full address of the location. */
+ @SerializedName("address")
+ Address address;
+
+ /** Identification numbers associated with the location. */
+ @SerializedName("business_registration")
+ BusinessRegistration businessRegistration;
+
+ /** Required. A name for the location. */
+ @SerializedName("display_name")
+ String displayName;
+
+ /** Specifies which fields in the response should be expanded. */
+ @SerializedName("expand")
+ List expand;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ private PaymentLocationCreateParams(
+ Address address,
+ BusinessRegistration businessRegistration,
+ String displayName,
+ List expand,
+ Map extraParams) {
+ this.address = address;
+ this.businessRegistration = businessRegistration;
+ this.displayName = displayName;
+ this.expand = expand;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Address address;
+
+ private BusinessRegistration businessRegistration;
+
+ private String displayName;
+
+ private List expand;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCreateParams build() {
+ return new PaymentLocationCreateParams(
+ this.address, this.businessRegistration, this.displayName, this.expand, this.extraParams);
+ }
+
+ /** Required. The full address of the location. */
+ public Builder setAddress(PaymentLocationCreateParams.Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /** Identification numbers associated with the location. */
+ public Builder setBusinessRegistration(
+ PaymentLocationCreateParams.BusinessRegistration businessRegistration) {
+ this.businessRegistration = businessRegistration;
+ return this;
+ }
+
+ /** Required. A name for the location. */
+ public Builder setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * PaymentLocationCreateParams#expand} for the field documentation.
+ */
+ public Builder addExpand(String element) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.add(element);
+ return this;
+ }
+
+ /**
+ * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
+ * subsequent calls adds additional elements to the original list. See {@link
+ * PaymentLocationCreateParams#expand} for the field documentation.
+ */
+ public Builder addAllExpand(List elements) {
+ if (this.expand == null) {
+ this.expand = new ArrayList<>();
+ }
+ this.expand.addAll(elements);
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * PaymentLocationCreateParams#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link PaymentLocationCreateParams#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Address {
+ /** City, district, suburb, town, or village. */
+ @SerializedName("city")
+ String city;
+
+ /**
+ * Required. Two-letter country code (ISO 3166-1 alpha-2).
+ */
+ @SerializedName("country")
+ String country;
+
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Address line 1, such as the street, PO Box, or company name. */
+ @SerializedName("line1")
+ String line1;
+
+ /** Address line 2, such as the apartment, suite, unit, or building. */
+ @SerializedName("line2")
+ String line2;
+
+ /** ZIP or postal code. */
+ @SerializedName("postal_code")
+ String postalCode;
+
+ /**
+ * State, county, province, or region (ISO
+ * 3166-2).
+ */
+ @SerializedName("state")
+ String state;
+
+ private Address(
+ String city,
+ String country,
+ Map extraParams,
+ String line1,
+ String line2,
+ String postalCode,
+ String state) {
+ this.city = city;
+ this.country = country;
+ this.extraParams = extraParams;
+ this.line1 = line1;
+ this.line2 = line2;
+ this.postalCode = postalCode;
+ this.state = state;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private String city;
+
+ private String country;
+
+ private Map extraParams;
+
+ private String line1;
+
+ private String line2;
+
+ private String postalCode;
+
+ private String state;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCreateParams.Address build() {
+ return new PaymentLocationCreateParams.Address(
+ this.city,
+ this.country,
+ this.extraParams,
+ this.line1,
+ this.line2,
+ this.postalCode,
+ this.state);
+ }
+
+ /** City, district, suburb, town, or village. */
+ public Builder setCity(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * Required. Two-letter country code (ISO 3166-1 alpha-2).
+ */
+ public Builder setCountry(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * PaymentLocationCreateParams.Address#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link PaymentLocationCreateParams.Address#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Address line 1, such as the street, PO Box, or company name. */
+ public Builder setLine1(String line1) {
+ this.line1 = line1;
+ return this;
+ }
+
+ /** Address line 2, such as the apartment, suite, unit, or building. */
+ public Builder setLine2(String line2) {
+ this.line2 = line2;
+ return this;
+ }
+
+ /** ZIP or postal code. */
+ public Builder setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ /**
+ * State, county, province, or region (ISO
+ * 3166-2).
+ */
+ public Builder setState(String state) {
+ this.state = state;
+ return this;
+ }
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class BusinessRegistration {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /**
+ * 14-digit SIRET (Système d'identification du répertoire des établissements) number for the
+ * location.
+ */
+ @SerializedName("siret")
+ String siret;
+
+ private BusinessRegistration(Map extraParams, String siret) {
+ this.extraParams = extraParams;
+ this.siret = siret;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String siret;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentLocationCreateParams.BusinessRegistration build() {
+ return new PaymentLocationCreateParams.BusinessRegistration(this.extraParams, this.siret);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * PaymentLocationCreateParams.BusinessRegistration#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link PaymentLocationCreateParams.BusinessRegistration#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /**
+ * 14-digit SIRET (Système d'identification du répertoire des établissements) number for the
+ * location.
+ */
+ public Builder setSiret(String siret) {
+ this.siret = siret;
+ return this;
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
index 4cac6a6b46d..ebaa56615d5 100644
--- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
@@ -180,6 +180,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -519,6 +526,7 @@ private PaymentMethodCreateParams(
List expand,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -589,6 +597,7 @@ private PaymentMethodCreateParams(
this.expand = expand;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -690,6 +699,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -809,6 +820,7 @@ public PaymentMethodCreateParams build() {
this.expand,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -1123,6 +1135,15 @@ public Builder setFpx(PaymentMethodCreateParams.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ public Builder setGiftCard(PaymentMethodCreateParams.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -3466,6 +3487,75 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The content
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
+ * param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodCreateParams.GiftCard build() {
+ return new PaymentMethodCreateParams.GiftCard(this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
+ * PaymentMethodCreateParams.GiftCard#extraParams} for the field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link PaymentMethodCreateParams.GiftCard#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -7011,6 +7101,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java
index 0ff519d8043..e7aeb42a16f 100644
--- a/src/main/java/com/stripe/param/PaymentMethodListParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java
@@ -325,6 +325,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
index 220a3ed383e..9b235422f44 100644
--- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
@@ -786,6 +786,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -1124,6 +1131,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -1190,6 +1198,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -1283,6 +1292,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -1398,6 +1409,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -1651,6 +1663,15 @@ public Builder setFpx(SetupIntentConfirmParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(SetupIntentConfirmParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -3742,6 +3763,78 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodData.GiftCard build() {
+ return new SetupIntentConfirmParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentConfirmParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentConfirmParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -7303,6 +7396,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
index c4f4d42d7eb..1c87ab9827f 100644
--- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
@@ -1324,6 +1324,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -1662,6 +1669,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -1728,6 +1736,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -1821,6 +1830,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -1936,6 +1947,7 @@ public SetupIntentCreateParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -2189,6 +2201,15 @@ public Builder setFpx(SetupIntentCreateParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(SetupIntentCreateParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -4278,6 +4299,78 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ String giftCard;
+
+ private GiftCard(Map extraParams, String giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private String giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodData.GiftCard build() {
+ return new SetupIntentCreateParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentCreateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentCreateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -7837,6 +7930,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
@@ -13747,6 +13843,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
index f523acbff19..dd234de1581 100644
--- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
@@ -693,6 +693,13 @@ public static class PaymentMethodData {
@SerializedName("fpx")
Fpx fpx;
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift card
+ * payment method.
+ */
+ @SerializedName("gift_card")
+ GiftCard giftCard;
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -1031,6 +1038,7 @@ private PaymentMethodData(
Eps eps,
Map extraParams,
Fpx fpx,
+ GiftCard giftCard,
Giropay giropay,
Gopay gopay,
Grabpay grabpay,
@@ -1097,6 +1105,7 @@ private PaymentMethodData(
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
+ this.giftCard = giftCard;
this.giropay = giropay;
this.gopay = gopay;
this.grabpay = grabpay;
@@ -1190,6 +1199,8 @@ public static class Builder {
private Fpx fpx;
+ private GiftCard giftCard;
+
private Giropay giropay;
private Gopay gopay;
@@ -1305,6 +1316,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() {
this.eps,
this.extraParams,
this.fpx,
+ this.giftCard,
this.giropay,
this.gopay,
this.grabpay,
@@ -1558,6 +1570,15 @@ public Builder setFpx(SetupIntentUpdateParams.PaymentMethodData.Fpx fpx) {
return this;
}
+ /**
+ * If this is a {@code gift_card} PaymentMethod, this hash contains details about the gift
+ * card payment method.
+ */
+ public Builder setGiftCard(SetupIntentUpdateParams.PaymentMethodData.GiftCard giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
@@ -3755,6 +3776,84 @@ public enum Bank implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class GiftCard {
+ /**
+ * Map of extra parameters for custom features not available in this client library. The
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
+ * name in this param object. Effectively, this map is flattened to its parent instance.
+ */
+ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
+ Map extraParams;
+
+ /** Required. The gift card ID to redeem */
+ @SerializedName("gift_card")
+ Object giftCard;
+
+ private GiftCard(Map extraParams, Object giftCard) {
+ this.extraParams = extraParams;
+ this.giftCard = giftCard;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Object giftCard;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodData.GiftCard build() {
+ return new SetupIntentUpdateParams.PaymentMethodData.GiftCard(
+ this.extraParams, this.giftCard);
+ }
+
+ /**
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentUpdateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putExtraParam(String key, Object value) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
+ * map. See {@link SetupIntentUpdateParams.PaymentMethodData.GiftCard#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(String giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+
+ /** Required. The gift card ID to redeem */
+ public Builder setGiftCard(EmptyParam giftCard) {
+ this.giftCard = giftCard;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class Giropay {
@@ -7419,6 +7518,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
@@ -13419,6 +13521,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("fpx")
FPX("fpx"),
+ @SerializedName("gift_card")
+ GIFT_CARD("gift_card"),
+
@SerializedName("giropay")
GIROPAY("giropay"),
diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java
index a38fc2355e7..553e480769d 100644
--- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java
+++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java
@@ -3,6 +3,7 @@
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
+import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -34,6 +35,10 @@ public class RequestedSessionConfirmParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /** The metadata for this requested session. */
+ @SerializedName("metadata")
+ Object metadata;
+
/** The PaymentMethod to use with the requested session. */
@SerializedName("payment_method")
String paymentMethod;
@@ -54,6 +59,7 @@ private RequestedSessionConfirmParams(
BuyerConsents buyerConsents,
List expand,
Map extraParams,
+ Object metadata,
String paymentMethod,
String returnUrl,
RiskDetails riskDetails) {
@@ -61,6 +67,7 @@ private RequestedSessionConfirmParams(
this.buyerConsents = buyerConsents;
this.expand = expand;
this.extraParams = extraParams;
+ this.metadata = metadata;
this.paymentMethod = paymentMethod;
this.returnUrl = returnUrl;
this.riskDetails = riskDetails;
@@ -79,6 +86,8 @@ public static class Builder {
private Map extraParams;
+ private Object metadata;
+
private String paymentMethod;
private String returnUrl;
@@ -92,6 +101,7 @@ public RequestedSessionConfirmParams build() {
this.buyerConsents,
this.expand,
this.extraParams,
+ this.metadata,
this.paymentMethod,
this.returnUrl,
this.riskDetails);
@@ -162,6 +172,46 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /**
+ * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
+ * and subsequent calls add additional key/value pairs to the original map. See {@link
+ * RequestedSessionConfirmParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).put(key, value);
+ return this;
+ }
+
+ /**
+ * Add all map key/value pairs to `metadata` map. A map is initialized for the first
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
+ * See {@link RequestedSessionConfirmParams#metadata} for the field documentation.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null || this.metadata instanceof EmptyParam) {
+ this.metadata = new HashMap();
+ }
+ ((Map) this.metadata).putAll(map);
+ return this;
+ }
+
+ /** The metadata for this requested session. */
+ public Builder setMetadata(EmptyParam metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /** The metadata for this requested session. */
+ public Builder setMetadata(Map metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
/** The PaymentMethod to use with the requested session. */
public Builder setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
diff --git a/src/main/java/com/stripe/service/PaymentLocationService.java b/src/main/java/com/stripe/service/PaymentLocationService.java
new file mode 100644
index 00000000000..cc52f7d7777
--- /dev/null
+++ b/src/main/java/com/stripe/service/PaymentLocationService.java
@@ -0,0 +1,37 @@
+// File generated from our OpenAPI spec
+package com.stripe.service;
+
+import com.stripe.exception.StripeException;
+import com.stripe.model.PaymentLocation;
+import com.stripe.net.ApiRequest;
+import com.stripe.net.ApiRequestParams;
+import com.stripe.net.ApiResource;
+import com.stripe.net.ApiService;
+import com.stripe.net.BaseAddress;
+import com.stripe.net.RequestOptions;
+import com.stripe.net.StripeResponseGetter;
+import com.stripe.param.PaymentLocationCreateParams;
+
+public final class PaymentLocationService extends ApiService {
+ public PaymentLocationService(StripeResponseGetter responseGetter) {
+ super(responseGetter);
+ }
+
+ /** Create a Payment Location. */
+ public PaymentLocation create(PaymentLocationCreateParams params) throws StripeException {
+ return create(params, (RequestOptions) null);
+ }
+ /** Create a Payment Location. */
+ public PaymentLocation create(PaymentLocationCreateParams params, RequestOptions options)
+ throws StripeException {
+ String path = "/v1/payment_locations";
+ ApiRequest request =
+ new ApiRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ path,
+ ApiRequestParams.paramsToMap(params),
+ options);
+ return this.request(request, PaymentLocation.class);
+ }
+}
diff --git a/src/main/java/com/stripe/service/V1Services.java b/src/main/java/com/stripe/service/V1Services.java
index a710222f790..ad9438bde9c 100644
--- a/src/main/java/com/stripe/service/V1Services.java
+++ b/src/main/java/com/stripe/service/V1Services.java
@@ -205,6 +205,10 @@ public com.stripe.service.PaymentLinkService paymentLinks() {
return new com.stripe.service.PaymentLinkService(this.getResponseGetter());
}
+ public com.stripe.service.PaymentLocationService paymentLocations() {
+ return new com.stripe.service.PaymentLocationService(this.getResponseGetter());
+ }
+
public com.stripe.service.PaymentMethodConfigurationService paymentMethodConfigurations() {
return new com.stripe.service.PaymentMethodConfigurationService(this.getResponseGetter());
}
From c059cf90181e917067763cdc83f8567caaaccaa0 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 6 May 2026 00:37:42 +0000
Subject: [PATCH 2/3] Update generated code for v2255 and
---
CODEGEN_VERSION | 2 +-
.../StripeEventNotificationHandler.java | 2960 +++++++++++++++++
.../events/UnknownEventNotification.java | 1 +
.../EventNotificationHandlerEndpoint.java | 108 +
.../EventNotificationWebhookHandler.java | 1 +
.../model/v2/core/EventNotification.java | 1 +
.../StripeEventNotificationHandlerTest.java | 518 +++
7 files changed, 3590 insertions(+), 1 deletion(-)
create mode 100644 src/main/java/com/stripe/StripeEventNotificationHandler.java
create mode 100644 src/main/java/com/stripe/examples/EventNotificationHandlerEndpoint.java
create mode 100644 src/test/java/com/stripe/StripeEventNotificationHandlerTest.java
diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index 575860e41ec..d19d890c6af 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-f0187e75a5c663247a7e8d02c02e8f3c69c9b144
\ No newline at end of file
+f02038df5433a605fce164b9af1b8b445252ee4f
\ No newline at end of file
diff --git a/src/main/java/com/stripe/StripeEventNotificationHandler.java b/src/main/java/com/stripe/StripeEventNotificationHandler.java
new file mode 100644
index 00000000000..bbf671f0729
--- /dev/null
+++ b/src/main/java/com/stripe/StripeEventNotificationHandler.java
@@ -0,0 +1,2960 @@
+// File copied from our code generator; changes here will be overwritten.
+package com.stripe;
+
+// event-notification-class-imports: The beginning of the section generated from our OpenAPI spec
+// - hack because we can't format java files whose imports aren't a single contiguous block
+// - so _any_ imports in this file have to come from codegen
+// - as do these comments, explaining the whole thing
+import com.stripe.events.V1AccountApplicationAuthorizedEventNotification;
+import com.stripe.events.V1AccountApplicationDeauthorizedEventNotification;
+import com.stripe.events.V1AccountExternalAccountCreatedEventNotification;
+import com.stripe.events.V1AccountExternalAccountDeletedEventNotification;
+import com.stripe.events.V1AccountExternalAccountUpdatedEventNotification;
+import com.stripe.events.V1AccountSignalsIncludingDelinquencyCreatedEventNotification;
+import com.stripe.events.V1AccountUpdatedEventNotification;
+import com.stripe.events.V1ApplicationFeeCreatedEventNotification;
+import com.stripe.events.V1ApplicationFeeRefundUpdatedEventNotification;
+import com.stripe.events.V1ApplicationFeeRefundedEventNotification;
+import com.stripe.events.V1BalanceAvailableEventNotification;
+import com.stripe.events.V1BillingAlertTriggeredEventNotification;
+import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification;
+import com.stripe.events.V1BillingMeterNoMeterFoundEventNotification;
+import com.stripe.events.V1BillingPortalConfigurationCreatedEventNotification;
+import com.stripe.events.V1BillingPortalConfigurationUpdatedEventNotification;
+import com.stripe.events.V1BillingPortalSessionCreatedEventNotification;
+import com.stripe.events.V1CapabilityUpdatedEventNotification;
+import com.stripe.events.V1CashBalanceFundsAvailableEventNotification;
+import com.stripe.events.V1ChargeCapturedEventNotification;
+import com.stripe.events.V1ChargeDisputeClosedEventNotification;
+import com.stripe.events.V1ChargeDisputeCreatedEventNotification;
+import com.stripe.events.V1ChargeDisputeFundsReinstatedEventNotification;
+import com.stripe.events.V1ChargeDisputeFundsWithdrawnEventNotification;
+import com.stripe.events.V1ChargeDisputeUpdatedEventNotification;
+import com.stripe.events.V1ChargeExpiredEventNotification;
+import com.stripe.events.V1ChargeFailedEventNotification;
+import com.stripe.events.V1ChargePendingEventNotification;
+import com.stripe.events.V1ChargeRefundUpdatedEventNotification;
+import com.stripe.events.V1ChargeRefundedEventNotification;
+import com.stripe.events.V1ChargeSucceededEventNotification;
+import com.stripe.events.V1ChargeUpdatedEventNotification;
+import com.stripe.events.V1CheckoutSessionAsyncPaymentFailedEventNotification;
+import com.stripe.events.V1CheckoutSessionAsyncPaymentSucceededEventNotification;
+import com.stripe.events.V1CheckoutSessionCompletedEventNotification;
+import com.stripe.events.V1CheckoutSessionExpiredEventNotification;
+import com.stripe.events.V1ClimateOrderCanceledEventNotification;
+import com.stripe.events.V1ClimateOrderCreatedEventNotification;
+import com.stripe.events.V1ClimateOrderDelayedEventNotification;
+import com.stripe.events.V1ClimateOrderDeliveredEventNotification;
+import com.stripe.events.V1ClimateOrderProductSubstitutedEventNotification;
+import com.stripe.events.V1ClimateProductCreatedEventNotification;
+import com.stripe.events.V1ClimateProductPricingUpdatedEventNotification;
+import com.stripe.events.V1CouponCreatedEventNotification;
+import com.stripe.events.V1CouponDeletedEventNotification;
+import com.stripe.events.V1CouponUpdatedEventNotification;
+import com.stripe.events.V1CreditNoteCreatedEventNotification;
+import com.stripe.events.V1CreditNoteUpdatedEventNotification;
+import com.stripe.events.V1CreditNoteVoidedEventNotification;
+import com.stripe.events.V1CustomerCashBalanceTransactionCreatedEventNotification;
+import com.stripe.events.V1CustomerCreatedEventNotification;
+import com.stripe.events.V1CustomerDeletedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionCreatedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionDeletedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionPausedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionPendingUpdateAppliedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionPendingUpdateExpiredEventNotification;
+import com.stripe.events.V1CustomerSubscriptionResumedEventNotification;
+import com.stripe.events.V1CustomerSubscriptionTrialWillEndEventNotification;
+import com.stripe.events.V1CustomerSubscriptionUpdatedEventNotification;
+import com.stripe.events.V1CustomerTaxIdCreatedEventNotification;
+import com.stripe.events.V1CustomerTaxIdDeletedEventNotification;
+import com.stripe.events.V1CustomerTaxIdUpdatedEventNotification;
+import com.stripe.events.V1CustomerUpdatedEventNotification;
+import com.stripe.events.V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification;
+import com.stripe.events.V1FileCreatedEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountCreatedEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountDeactivatedEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountDisconnectedEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountReactivatedEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountRefreshedBalanceEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountRefreshedOwnershipEventNotification;
+import com.stripe.events.V1FinancialConnectionsAccountRefreshedTransactionsEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionCanceledEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionCreatedEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionProcessingEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionRedactedEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionRequiresInputEventNotification;
+import com.stripe.events.V1IdentityVerificationSessionVerifiedEventNotification;
+import com.stripe.events.V1InvoiceCreatedEventNotification;
+import com.stripe.events.V1InvoiceDeletedEventNotification;
+import com.stripe.events.V1InvoiceFinalizationFailedEventNotification;
+import com.stripe.events.V1InvoiceFinalizedEventNotification;
+import com.stripe.events.V1InvoiceMarkedUncollectibleEventNotification;
+import com.stripe.events.V1InvoiceOverdueEventNotification;
+import com.stripe.events.V1InvoiceOverpaidEventNotification;
+import com.stripe.events.V1InvoicePaidEventNotification;
+import com.stripe.events.V1InvoicePaymentActionRequiredEventNotification;
+import com.stripe.events.V1InvoicePaymentFailedEventNotification;
+import com.stripe.events.V1InvoicePaymentPaidEventNotification;
+import com.stripe.events.V1InvoicePaymentSucceededEventNotification;
+import com.stripe.events.V1InvoiceSentEventNotification;
+import com.stripe.events.V1InvoiceUpcomingEventNotification;
+import com.stripe.events.V1InvoiceUpdatedEventNotification;
+import com.stripe.events.V1InvoiceVoidedEventNotification;
+import com.stripe.events.V1InvoiceWillBeDueEventNotification;
+import com.stripe.events.V1InvoiceitemCreatedEventNotification;
+import com.stripe.events.V1InvoiceitemDeletedEventNotification;
+import com.stripe.events.V1IssuingAuthorizationCreatedEventNotification;
+import com.stripe.events.V1IssuingAuthorizationRequestEventNotification;
+import com.stripe.events.V1IssuingAuthorizationUpdatedEventNotification;
+import com.stripe.events.V1IssuingCardCreatedEventNotification;
+import com.stripe.events.V1IssuingCardUpdatedEventNotification;
+import com.stripe.events.V1IssuingCardholderCreatedEventNotification;
+import com.stripe.events.V1IssuingCardholderUpdatedEventNotification;
+import com.stripe.events.V1IssuingDisputeClosedEventNotification;
+import com.stripe.events.V1IssuingDisputeCreatedEventNotification;
+import com.stripe.events.V1IssuingDisputeFundsReinstatedEventNotification;
+import com.stripe.events.V1IssuingDisputeFundsRescindedEventNotification;
+import com.stripe.events.V1IssuingDisputeSubmittedEventNotification;
+import com.stripe.events.V1IssuingDisputeUpdatedEventNotification;
+import com.stripe.events.V1IssuingPersonalizationDesignActivatedEventNotification;
+import com.stripe.events.V1IssuingPersonalizationDesignDeactivatedEventNotification;
+import com.stripe.events.V1IssuingPersonalizationDesignRejectedEventNotification;
+import com.stripe.events.V1IssuingPersonalizationDesignUpdatedEventNotification;
+import com.stripe.events.V1IssuingTokenCreatedEventNotification;
+import com.stripe.events.V1IssuingTokenUpdatedEventNotification;
+import com.stripe.events.V1IssuingTransactionCreatedEventNotification;
+import com.stripe.events.V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification;
+import com.stripe.events.V1IssuingTransactionUpdatedEventNotification;
+import com.stripe.events.V1MandateUpdatedEventNotification;
+import com.stripe.events.V1PaymentIntentAmountCapturableUpdatedEventNotification;
+import com.stripe.events.V1PaymentIntentCanceledEventNotification;
+import com.stripe.events.V1PaymentIntentCreatedEventNotification;
+import com.stripe.events.V1PaymentIntentPartiallyFundedEventNotification;
+import com.stripe.events.V1PaymentIntentPaymentFailedEventNotification;
+import com.stripe.events.V1PaymentIntentProcessingEventNotification;
+import com.stripe.events.V1PaymentIntentRequiresActionEventNotification;
+import com.stripe.events.V1PaymentIntentSucceededEventNotification;
+import com.stripe.events.V1PaymentLinkCreatedEventNotification;
+import com.stripe.events.V1PaymentLinkUpdatedEventNotification;
+import com.stripe.events.V1PaymentMethodAttachedEventNotification;
+import com.stripe.events.V1PaymentMethodAutomaticallyUpdatedEventNotification;
+import com.stripe.events.V1PaymentMethodDetachedEventNotification;
+import com.stripe.events.V1PaymentMethodUpdatedEventNotification;
+import com.stripe.events.V1PayoutCanceledEventNotification;
+import com.stripe.events.V1PayoutCreatedEventNotification;
+import com.stripe.events.V1PayoutFailedEventNotification;
+import com.stripe.events.V1PayoutPaidEventNotification;
+import com.stripe.events.V1PayoutReconciliationCompletedEventNotification;
+import com.stripe.events.V1PayoutUpdatedEventNotification;
+import com.stripe.events.V1PersonCreatedEventNotification;
+import com.stripe.events.V1PersonDeletedEventNotification;
+import com.stripe.events.V1PersonUpdatedEventNotification;
+import com.stripe.events.V1PlanCreatedEventNotification;
+import com.stripe.events.V1PlanDeletedEventNotification;
+import com.stripe.events.V1PlanUpdatedEventNotification;
+import com.stripe.events.V1PriceCreatedEventNotification;
+import com.stripe.events.V1PriceDeletedEventNotification;
+import com.stripe.events.V1PriceUpdatedEventNotification;
+import com.stripe.events.V1ProductCreatedEventNotification;
+import com.stripe.events.V1ProductDeletedEventNotification;
+import com.stripe.events.V1ProductUpdatedEventNotification;
+import com.stripe.events.V1PromotionCodeCreatedEventNotification;
+import com.stripe.events.V1PromotionCodeUpdatedEventNotification;
+import com.stripe.events.V1QuoteAcceptedEventNotification;
+import com.stripe.events.V1QuoteCanceledEventNotification;
+import com.stripe.events.V1QuoteCreatedEventNotification;
+import com.stripe.events.V1QuoteFinalizedEventNotification;
+import com.stripe.events.V1RadarEarlyFraudWarningCreatedEventNotification;
+import com.stripe.events.V1RadarEarlyFraudWarningUpdatedEventNotification;
+import com.stripe.events.V1RefundCreatedEventNotification;
+import com.stripe.events.V1RefundFailedEventNotification;
+import com.stripe.events.V1RefundUpdatedEventNotification;
+import com.stripe.events.V1ReviewClosedEventNotification;
+import com.stripe.events.V1ReviewOpenedEventNotification;
+import com.stripe.events.V1SetupIntentCanceledEventNotification;
+import com.stripe.events.V1SetupIntentCreatedEventNotification;
+import com.stripe.events.V1SetupIntentRequiresActionEventNotification;
+import com.stripe.events.V1SetupIntentSetupFailedEventNotification;
+import com.stripe.events.V1SetupIntentSucceededEventNotification;
+import com.stripe.events.V1SigmaScheduledQueryRunCreatedEventNotification;
+import com.stripe.events.V1SourceCanceledEventNotification;
+import com.stripe.events.V1SourceChargeableEventNotification;
+import com.stripe.events.V1SourceFailedEventNotification;
+import com.stripe.events.V1SourceRefundAttributesRequiredEventNotification;
+import com.stripe.events.V1SubscriptionScheduleAbortedEventNotification;
+import com.stripe.events.V1SubscriptionScheduleCanceledEventNotification;
+import com.stripe.events.V1SubscriptionScheduleCompletedEventNotification;
+import com.stripe.events.V1SubscriptionScheduleCreatedEventNotification;
+import com.stripe.events.V1SubscriptionScheduleExpiringEventNotification;
+import com.stripe.events.V1SubscriptionScheduleReleasedEventNotification;
+import com.stripe.events.V1SubscriptionScheduleUpdatedEventNotification;
+import com.stripe.events.V1TaxRateCreatedEventNotification;
+import com.stripe.events.V1TaxRateUpdatedEventNotification;
+import com.stripe.events.V1TaxSettingsUpdatedEventNotification;
+import com.stripe.events.V1TerminalReaderActionFailedEventNotification;
+import com.stripe.events.V1TerminalReaderActionSucceededEventNotification;
+import com.stripe.events.V1TerminalReaderActionUpdatedEventNotification;
+import com.stripe.events.V1TestHelpersTestClockAdvancingEventNotification;
+import com.stripe.events.V1TestHelpersTestClockCreatedEventNotification;
+import com.stripe.events.V1TestHelpersTestClockDeletedEventNotification;
+import com.stripe.events.V1TestHelpersTestClockInternalFailureEventNotification;
+import com.stripe.events.V1TestHelpersTestClockReadyEventNotification;
+import com.stripe.events.V1TopupCanceledEventNotification;
+import com.stripe.events.V1TopupCreatedEventNotification;
+import com.stripe.events.V1TopupFailedEventNotification;
+import com.stripe.events.V1TopupReversedEventNotification;
+import com.stripe.events.V1TopupSucceededEventNotification;
+import com.stripe.events.V1TransferCreatedEventNotification;
+import com.stripe.events.V1TransferReversedEventNotification;
+import com.stripe.events.V1TransferUpdatedEventNotification;
+import com.stripe.events.V2BillingCadenceBilledEventNotification;
+import com.stripe.events.V2BillingCadenceCanceledEventNotification;
+import com.stripe.events.V2BillingCadenceCreatedEventNotification;
+import com.stripe.events.V2BillingLicenseFeeCreatedEventNotification;
+import com.stripe.events.V2BillingLicenseFeeUpdatedEventNotification;
+import com.stripe.events.V2BillingLicenseFeeVersionCreatedEventNotification;
+import com.stripe.events.V2BillingLicensedItemCreatedEventNotification;
+import com.stripe.events.V2BillingLicensedItemUpdatedEventNotification;
+import com.stripe.events.V2BillingMeteredItemCreatedEventNotification;
+import com.stripe.events.V2BillingMeteredItemUpdatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanComponentCreatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanComponentUpdatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanCreatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionCollectionPausedEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionServicingActivatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionServicingCanceledEventNotification;
+import com.stripe.events.V2BillingPricingPlanSubscriptionServicingPausedEventNotification;
+import com.stripe.events.V2BillingPricingPlanUpdatedEventNotification;
+import com.stripe.events.V2BillingPricingPlanVersionCreatedEventNotification;
+import com.stripe.events.V2BillingRateCardCreatedEventNotification;
+import com.stripe.events.V2BillingRateCardCustomPricingUnitOverageRateCreatedEventNotification;
+import com.stripe.events.V2BillingRateCardRateCreatedEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionActivatedEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCanceledEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCollectionCurrentEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCollectionPastDueEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCollectionPausedEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionCollectionUnpaidEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionServicingActivatedEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionServicingCanceledEventNotification;
+import com.stripe.events.V2BillingRateCardSubscriptionServicingPausedEventNotification;
+import com.stripe.events.V2BillingRateCardUpdatedEventNotification;
+import com.stripe.events.V2BillingRateCardVersionCreatedEventNotification;
+import com.stripe.events.V2CommerceProductCatalogImportsFailedEventNotification;
+import com.stripe.events.V2CommerceProductCatalogImportsProcessingEventNotification;
+import com.stripe.events.V2CommerceProductCatalogImportsSucceededEventNotification;
+import com.stripe.events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification;
+import com.stripe.events.V2CoreAccountClosedEventNotification;
+import com.stripe.events.V2CoreAccountCreatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationCardCreatorUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification;
+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;
+import com.stripe.events.V2CoreAccountPersonCreatedEventNotification;
+import com.stripe.events.V2CoreAccountPersonDeletedEventNotification;
+import com.stripe.events.V2CoreAccountPersonUpdatedEventNotification;
+import com.stripe.events.V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification;
+import com.stripe.events.V2CoreAccountUpdatedEventNotification;
+import com.stripe.events.V2CoreApprovalRequestApprovedEventNotification;
+import com.stripe.events.V2CoreApprovalRequestCanceledEventNotification;
+import com.stripe.events.V2CoreApprovalRequestCreatedEventNotification;
+import com.stripe.events.V2CoreApprovalRequestExpiredEventNotification;
+import com.stripe.events.V2CoreApprovalRequestFailedEventNotification;
+import com.stripe.events.V2CoreApprovalRequestRejectedEventNotification;
+import com.stripe.events.V2CoreApprovalRequestSucceededEventNotification;
+import com.stripe.events.V2CoreBatchJobBatchFailedEventNotification;
+import com.stripe.events.V2CoreBatchJobCanceledEventNotification;
+import com.stripe.events.V2CoreBatchJobCompletedEventNotification;
+import com.stripe.events.V2CoreBatchJobCreatedEventNotification;
+import com.stripe.events.V2CoreBatchJobReadyForUploadEventNotification;
+import com.stripe.events.V2CoreBatchJobTimeoutEventNotification;
+import com.stripe.events.V2CoreBatchJobUpdatedEventNotification;
+import com.stripe.events.V2CoreBatchJobUploadTimeoutEventNotification;
+import com.stripe.events.V2CoreBatchJobValidatingEventNotification;
+import com.stripe.events.V2CoreBatchJobValidationFailedEventNotification;
+import com.stripe.events.V2CoreClaimableSandboxClaimedEventNotification;
+import com.stripe.events.V2CoreClaimableSandboxCreatedEventNotification;
+import com.stripe.events.V2CoreClaimableSandboxExpiredEventNotification;
+import com.stripe.events.V2CoreClaimableSandboxExpiringEventNotification;
+import com.stripe.events.V2CoreClaimableSandboxUpdatedEventNotification;
+import com.stripe.events.V2CoreEventDestinationPingEventNotification;
+import com.stripe.events.V2CoreHealthApiErrorFiringEventNotification;
+import com.stripe.events.V2CoreHealthApiErrorResolvedEventNotification;
+import com.stripe.events.V2CoreHealthApiLatencyFiringEventNotification;
+import com.stripe.events.V2CoreHealthApiLatencyResolvedEventNotification;
+import com.stripe.events.V2CoreHealthAuthorizationRateDropFiringEventNotification;
+import com.stripe.events.V2CoreHealthAuthorizationRateDropResolvedEventNotification;
+import com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification;
+import com.stripe.events.V2CoreHealthFraudRateIncreasedEventNotification;
+import com.stripe.events.V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification;
+import com.stripe.events.V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification;
+import com.stripe.events.V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification;
+import com.stripe.events.V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification;
+import com.stripe.events.V2CoreHealthMeterEventSummariesDelayedFiringEventNotification;
+import com.stripe.events.V2CoreHealthMeterEventSummariesDelayedResolvedEventNotification;
+import com.stripe.events.V2CoreHealthPaymentMethodErrorFiringEventNotification;
+import com.stripe.events.V2CoreHealthPaymentMethodErrorResolvedEventNotification;
+import com.stripe.events.V2CoreHealthSepaDebitDelayedFiringEventNotification;
+import com.stripe.events.V2CoreHealthSepaDebitDelayedResolvedEventNotification;
+import com.stripe.events.V2CoreHealthTrafficVolumeDropFiringEventNotification;
+import com.stripe.events.V2CoreHealthTrafficVolumeDropResolvedEventNotification;
+import com.stripe.events.V2CoreHealthWebhookLatencyFiringEventNotification;
+import com.stripe.events.V2CoreHealthWebhookLatencyResolvedEventNotification;
+import com.stripe.events.V2DataReportingQueryRunCreatedEventNotification;
+import com.stripe.events.V2DataReportingQueryRunFailedEventNotification;
+import com.stripe.events.V2DataReportingQueryRunSucceededEventNotification;
+import com.stripe.events.V2DataReportingQueryRunUpdatedEventNotification;
+import com.stripe.events.V2ExtendExtensionRunFailedEventNotification;
+import com.stripe.events.V2ExtendWorkflowRunFailedEventNotification;
+import com.stripe.events.V2ExtendWorkflowRunStartedEventNotification;
+import com.stripe.events.V2ExtendWorkflowRunSucceededEventNotification;
+import com.stripe.events.V2IamApiKeyCreatedEventNotification;
+import com.stripe.events.V2IamApiKeyDefaultSecretRevealedEventNotification;
+import com.stripe.events.V2IamApiKeyExpiredEventNotification;
+import com.stripe.events.V2IamApiKeyPermissionsUpdatedEventNotification;
+import com.stripe.events.V2IamApiKeyRotatedEventNotification;
+import com.stripe.events.V2IamApiKeyUpdatedEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantApprovedEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantCanceledEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantDeniedEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantRemovedEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantRequestedEventNotification;
+import com.stripe.events.V2IamStripeAccessGrantUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementFinancialAddressActivatedEventNotification;
+import com.stripe.events.V2MoneyManagementFinancialAddressFailedEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferAvailableEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferBankDebitFailedEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferBankDebitProcessingEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferBankDebitQueuedEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferBankDebitReturnedEventNotification;
+import com.stripe.events.V2MoneyManagementInboundTransferBankDebitSucceededEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentCanceledEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentFailedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentPostedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentReturnedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundPaymentUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferCanceledEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferFailedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferPostedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferReturnedEventNotification;
+import com.stripe.events.V2MoneyManagementOutboundTransferUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementPayoutMethodCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementPayoutMethodUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedCreditAvailableEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedCreditFailedEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedCreditReturnedEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedCreditSucceededEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedDebitCanceledEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedDebitFailedEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedDebitPendingEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedDebitSucceededEventNotification;
+import com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementRecipientVerificationUpdatedEventNotification;
+import com.stripe.events.V2MoneyManagementTransactionCreatedEventNotification;
+import com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification;
+import com.stripe.events.V2OrchestratedCommerceAgreementConfirmedEventNotification;
+import com.stripe.events.V2OrchestratedCommerceAgreementCreatedEventNotification;
+import com.stripe.events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification;
+import com.stripe.events.V2OrchestratedCommerceAgreementTerminatedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentCanceledEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentCreatedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentFailedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentPausedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentRequiresCaptureEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentResumedEventNotification;
+import com.stripe.events.V2PaymentsOffSessionPaymentSucceededEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentCanceledEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentCreatedEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentErroredEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentFundsNotReceivedEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentMatchedEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentNotFoundEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentSettledEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentSplitCanceledEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentSplitCreatedEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentSplitSettledEventNotification;
+import com.stripe.events.V2PaymentsSettlementAllocationIntentSubmittedEventNotification;
+import com.stripe.events.V2ReportingReportRunCreatedEventNotification;
+import com.stripe.events.V2ReportingReportRunFailedEventNotification;
+import com.stripe.events.V2ReportingReportRunSucceededEventNotification;
+import com.stripe.events.V2ReportingReportRunUpdatedEventNotification;
+import com.stripe.events.V2SignalsAccountSignalFraudulentMerchantReadyEventNotification;
+import com.stripe.exception.SignatureVerificationException;
+import com.stripe.model.v2.core.EventNotification;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+// event-notification-class-imports: The end of the section generated from our OpenAPI spec
+
+public class StripeEventNotificationHandler {
+ /**
+ * Functional interface for callback functions. It describes the signature of the functions you'll
+ * register on the StripeEventRouter to process incoming event notifications.
+ */
+ @FunctionalInterface
+ public interface Callback {
+ // this is an internal-facing method name that dictates how we call the stored method
+ void process(T event, StripeClient client);
+ }
+
+ /**
+ * Functional interface for handling otherwise unhandled events. It's similar to {@link Callback},
+ * but includes additional information about the unhandled event to help debug it.
+ */
+ @FunctionalInterface
+ public interface FallbackCallback {
+ // this is an internal-facing method name that dictates how we call the stored method
+ void process(
+ EventNotification event, StripeClient client, UnhandledNotificationDetails details);
+ }
+
+ /**
+ * Information about an unhandled event notification to make it easier to respond (and potentially
+ * update your integration).
+ */
+ public static class UnhandledNotificationDetails {
+ private boolean isKnownEventType;
+
+ private UnhandledNotificationDetails(boolean isKnownEventType) {
+ this.isKnownEventType = isKnownEventType;
+ }
+
+ /**
+ * If true, the unhandled event's type is known to the SDK (i.e., it was successfully
+ * deserialized into a specific `EventNotification` subclass).
+ */
+ public boolean isKnownEventType() {
+ return isKnownEventType;
+ }
+ }
+
+ // this is intentionally naiive to avoid the performance cost of interacting with `volatile`. We
+ // expect that registrations are done synchronously at startup time and handling will happen
+ // async, so thread-safe reads aren't important here.
+ private boolean hasHandledEvent = false;
+
+ private final String webhookSecret;
+ private final StripeClient client;
+ private final FallbackCallback fallbackCallback;
+ private final HashMap> registeredHandlers =
+ new HashMap<>();
+
+ public StripeEventNotificationHandler(
+ String webhookSecret, StripeClient client, FallbackCallback fallbackCallback) {
+ this.webhookSecret = webhookSecret;
+ this.client = client;
+ this.fallbackCallback = fallbackCallback;
+ }
+
+ private StripeEventNotificationHandler register(
+ String eventType, Callback handler) {
+ if (hasHandledEvent) {
+ throw new IllegalStateException("Cannot register handlers after handling an event");
+ }
+
+ if (this.registeredHandlers.containsKey(eventType)) {
+ throw new IllegalArgumentException("Handler already registered for event type: " + eventType);
+ }
+ this.registeredHandlers.put(eventType, handler);
+ return this;
+ }
+
+ /**
+ * Handle an incoming webhook event notification.
+ *
+ * @param webhookBody the incoming webhook body
+ * @param sigHeader the incoming webhook signature header
+ * @throws SignatureVerificationException if the validation of the webhook signature fails
+ * @throws IllegalArgumentException if no handler is registered for the event type
+ */
+ @SuppressWarnings("unchecked")
+ public void handle(String webhookBody, String sigHeader) throws SignatureVerificationException {
+ // setting this naiively isn't technically thread-safe, but we expect the all callbacks to be
+ // registered syncronously on startup, so this should be fine
+ hasHandledEvent = true;
+
+ EventNotification eventNotification =
+ this.client.parseEventNotification(webhookBody, sigHeader, this.webhookSecret);
+
+ Callback extends EventNotification> handler =
+ registeredHandlers.get(eventNotification.getType());
+
+ // Create a new client with the event's context for thread-safe processing
+ StripeClient eventClient = this.client.withStripeContext(eventNotification.context);
+
+ if (handler == null) {
+ boolean isKnownEventType =
+ !(eventNotification instanceof com.stripe.events.UnknownEventNotification);
+ UnhandledNotificationDetails details = new UnhandledNotificationDetails(isKnownEventType);
+
+ this.fallbackCallback.process(eventNotification, eventClient, details);
+ } else {
+ // this is technically unsafe but we control the registration API so should be ok
+ ((Callback) handler).process(eventNotification, eventClient);
+ }
+ }
+
+ // notification-handler-methods: The beginning of the section generated from our OpenAPI spec
+ public StripeEventNotificationHandler onV1AccountApplicationAuthorized(
+ Callback callback) {
+ this.register("v1.account.application.authorized", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountApplicationDeauthorized(
+ Callback callback) {
+ this.register("v1.account.application.deauthorized", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountExternalAccountCreated(
+ Callback callback) {
+ this.register("v1.account.external_account.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountExternalAccountDeleted(
+ Callback callback) {
+ this.register("v1.account.external_account.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountExternalAccountUpdated(
+ Callback callback) {
+ this.register("v1.account.external_account.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountUpdated(
+ Callback callback) {
+ this.register("v1.account.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1AccountSignalsIncludingDelinquencyCreated(
+ Callback callback) {
+ this.register("v1.account_signals[delinquency].created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ApplicationFeeCreated(
+ Callback callback) {
+ this.register("v1.application_fee.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ApplicationFeeRefundUpdated(
+ Callback callback) {
+ this.register("v1.application_fee.refund.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ApplicationFeeRefunded(
+ Callback callback) {
+ this.register("v1.application_fee.refunded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BalanceAvailable(
+ Callback callback) {
+ this.register("v1.balance.available", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingAlertTriggered(
+ Callback callback) {
+ this.register("v1.billing.alert.triggered", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingMeterErrorReportTriggered(
+ Callback callback) {
+ this.register("v1.billing.meter.error_report_triggered", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingMeterNoMeterFound(
+ Callback callback) {
+ this.register("v1.billing.meter.no_meter_found", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingPortalConfigurationCreated(
+ Callback callback) {
+ this.register("v1.billing_portal.configuration.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingPortalConfigurationUpdated(
+ Callback callback) {
+ this.register("v1.billing_portal.configuration.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1BillingPortalSessionCreated(
+ Callback callback) {
+ this.register("v1.billing_portal.session.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CapabilityUpdated(
+ Callback callback) {
+ this.register("v1.capability.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CashBalanceFundsAvailable(
+ Callback callback) {
+ this.register("v1.cash_balance.funds_available", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeCaptured(
+ Callback callback) {
+ this.register("v1.charge.captured", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeDisputeClosed(
+ Callback callback) {
+ this.register("v1.charge.dispute.closed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeDisputeCreated(
+ Callback callback) {
+ this.register("v1.charge.dispute.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeDisputeFundsReinstated(
+ Callback callback) {
+ this.register("v1.charge.dispute.funds_reinstated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeDisputeFundsWithdrawn(
+ Callback callback) {
+ this.register("v1.charge.dispute.funds_withdrawn", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeDisputeUpdated(
+ Callback callback) {
+ this.register("v1.charge.dispute.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeExpired(
+ Callback callback) {
+ this.register("v1.charge.expired", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeFailed(
+ Callback callback) {
+ this.register("v1.charge.failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargePending(
+ Callback callback) {
+ this.register("v1.charge.pending", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeRefundUpdated(
+ Callback callback) {
+ this.register("v1.charge.refund.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeRefunded(
+ Callback callback) {
+ this.register("v1.charge.refunded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeSucceeded(
+ Callback callback) {
+ this.register("v1.charge.succeeded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ChargeUpdated(
+ Callback callback) {
+ this.register("v1.charge.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CheckoutSessionAsyncPaymentFailed(
+ Callback callback) {
+ this.register("v1.checkout.session.async_payment_failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CheckoutSessionAsyncPaymentSucceeded(
+ Callback callback) {
+ this.register("v1.checkout.session.async_payment_succeeded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CheckoutSessionCompleted(
+ Callback callback) {
+ this.register("v1.checkout.session.completed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CheckoutSessionExpired(
+ Callback callback) {
+ this.register("v1.checkout.session.expired", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateOrderCanceled(
+ Callback callback) {
+ this.register("v1.climate.order.canceled", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateOrderCreated(
+ Callback callback) {
+ this.register("v1.climate.order.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateOrderDelayed(
+ Callback callback) {
+ this.register("v1.climate.order.delayed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateOrderDelivered(
+ Callback callback) {
+ this.register("v1.climate.order.delivered", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateOrderProductSubstituted(
+ Callback callback) {
+ this.register("v1.climate.order.product_substituted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateProductCreated(
+ Callback callback) {
+ this.register("v1.climate.product.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1ClimateProductPricingUpdated(
+ Callback callback) {
+ this.register("v1.climate.product.pricing_updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CouponCreated(
+ Callback callback) {
+ this.register("v1.coupon.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CouponDeleted(
+ Callback callback) {
+ this.register("v1.coupon.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CouponUpdated(
+ Callback callback) {
+ this.register("v1.coupon.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CreditNoteCreated(
+ Callback callback) {
+ this.register("v1.credit_note.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CreditNoteUpdated(
+ Callback callback) {
+ this.register("v1.credit_note.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CreditNoteVoided(
+ Callback callback) {
+ this.register("v1.credit_note.voided", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerCreated(
+ Callback callback) {
+ this.register("v1.customer.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerDeleted(
+ Callback callback) {
+ this.register("v1.customer.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionCreated(
+ Callback callback) {
+ this.register("v1.customer.subscription.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionDeleted(
+ Callback callback) {
+ this.register("v1.customer.subscription.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionPaused(
+ Callback callback) {
+ this.register("v1.customer.subscription.paused", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionPendingUpdateApplied(
+ Callback callback) {
+ this.register("v1.customer.subscription.pending_update_applied", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionPendingUpdateExpired(
+ Callback callback) {
+ this.register("v1.customer.subscription.pending_update_expired", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionResumed(
+ Callback callback) {
+ this.register("v1.customer.subscription.resumed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionTrialWillEnd(
+ Callback callback) {
+ this.register("v1.customer.subscription.trial_will_end", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerSubscriptionUpdated(
+ Callback callback) {
+ this.register("v1.customer.subscription.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerTaxIdCreated(
+ Callback callback) {
+ this.register("v1.customer.tax_id.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerTaxIdDeleted(
+ Callback callback) {
+ this.register("v1.customer.tax_id.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerTaxIdUpdated(
+ Callback callback) {
+ this.register("v1.customer.tax_id.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerUpdated(
+ Callback callback) {
+ this.register("v1.customer.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1CustomerCashBalanceTransactionCreated(
+ Callback callback) {
+ this.register("v1.customer_cash_balance_transaction.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1EntitlementsActiveEntitlementSummaryUpdated(
+ Callback callback) {
+ this.register("v1.entitlements.active_entitlement_summary.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FileCreated(
+ Callback callback) {
+ this.register("v1.file.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountCreated(
+ Callback callback) {
+ this.register("v1.financial_connections.account.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountDeactivated(
+ Callback callback) {
+ this.register("v1.financial_connections.account.deactivated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountDisconnected(
+ Callback callback) {
+ this.register("v1.financial_connections.account.disconnected", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountReactivated(
+ Callback callback) {
+ this.register("v1.financial_connections.account.reactivated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountRefreshedBalance(
+ Callback callback) {
+ this.register("v1.financial_connections.account.refreshed_balance", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountRefreshedOwnership(
+ Callback callback) {
+ this.register("v1.financial_connections.account.refreshed_ownership", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1FinancialConnectionsAccountRefreshedTransactions(
+ Callback callback) {
+ this.register("v1.financial_connections.account.refreshed_transactions", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionCanceled(
+ Callback callback) {
+ this.register("v1.identity.verification_session.canceled", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionCreated(
+ Callback callback) {
+ this.register("v1.identity.verification_session.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionProcessing(
+ Callback callback) {
+ this.register("v1.identity.verification_session.processing", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionRedacted(
+ Callback callback) {
+ this.register("v1.identity.verification_session.redacted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionRequiresInput(
+ Callback callback) {
+ this.register("v1.identity.verification_session.requires_input", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IdentityVerificationSessionVerified(
+ Callback callback) {
+ this.register("v1.identity.verification_session.verified", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceCreated(
+ Callback callback) {
+ this.register("v1.invoice.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceDeleted(
+ Callback callback) {
+ this.register("v1.invoice.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceFinalizationFailed(
+ Callback callback) {
+ this.register("v1.invoice.finalization_failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceFinalized(
+ Callback callback) {
+ this.register("v1.invoice.finalized", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceMarkedUncollectible(
+ Callback callback) {
+ this.register("v1.invoice.marked_uncollectible", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceOverdue(
+ Callback callback) {
+ this.register("v1.invoice.overdue", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceOverpaid(
+ Callback callback) {
+ this.register("v1.invoice.overpaid", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoicePaid(
+ Callback callback) {
+ this.register("v1.invoice.paid", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoicePaymentActionRequired(
+ Callback callback) {
+ this.register("v1.invoice.payment_action_required", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoicePaymentFailed(
+ Callback callback) {
+ this.register("v1.invoice.payment_failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoicePaymentSucceeded(
+ Callback callback) {
+ this.register("v1.invoice.payment_succeeded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceSent(
+ Callback callback) {
+ this.register("v1.invoice.sent", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceUpcoming(
+ Callback callback) {
+ this.register("v1.invoice.upcoming", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceUpdated(
+ Callback callback) {
+ this.register("v1.invoice.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceVoided(
+ Callback callback) {
+ this.register("v1.invoice.voided", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceWillBeDue(
+ Callback callback) {
+ this.register("v1.invoice.will_be_due", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoicePaymentPaid(
+ Callback callback) {
+ this.register("v1.invoice_payment.paid", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceitemCreated(
+ Callback callback) {
+ this.register("v1.invoiceitem.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1InvoiceitemDeleted(
+ Callback callback) {
+ this.register("v1.invoiceitem.deleted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingAuthorizationCreated(
+ Callback callback) {
+ this.register("v1.issuing_authorization.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingAuthorizationRequest(
+ Callback callback) {
+ this.register("v1.issuing_authorization.request", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingAuthorizationUpdated(
+ Callback callback) {
+ this.register("v1.issuing_authorization.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingCardCreated(
+ Callback callback) {
+ this.register("v1.issuing_card.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingCardUpdated(
+ Callback callback) {
+ this.register("v1.issuing_card.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingCardholderCreated(
+ Callback callback) {
+ this.register("v1.issuing_cardholder.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingCardholderUpdated(
+ Callback callback) {
+ this.register("v1.issuing_cardholder.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeClosed(
+ Callback callback) {
+ this.register("v1.issuing_dispute.closed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeCreated(
+ Callback callback) {
+ this.register("v1.issuing_dispute.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeFundsReinstated(
+ Callback callback) {
+ this.register("v1.issuing_dispute.funds_reinstated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeFundsRescinded(
+ Callback callback) {
+ this.register("v1.issuing_dispute.funds_rescinded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeSubmitted(
+ Callback callback) {
+ this.register("v1.issuing_dispute.submitted", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingDisputeUpdated(
+ Callback callback) {
+ this.register("v1.issuing_dispute.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingPersonalizationDesignActivated(
+ Callback callback) {
+ this.register("v1.issuing_personalization_design.activated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingPersonalizationDesignDeactivated(
+ Callback callback) {
+ this.register("v1.issuing_personalization_design.deactivated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingPersonalizationDesignRejected(
+ Callback callback) {
+ this.register("v1.issuing_personalization_design.rejected", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingPersonalizationDesignUpdated(
+ Callback callback) {
+ this.register("v1.issuing_personalization_design.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingTokenCreated(
+ Callback callback) {
+ this.register("v1.issuing_token.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingTokenUpdated(
+ Callback callback) {
+ this.register("v1.issuing_token.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingTransactionCreated(
+ Callback callback) {
+ this.register("v1.issuing_transaction.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingTransactionPurchaseDetailsReceiptUpdated(
+ Callback callback) {
+ this.register("v1.issuing_transaction.purchase_details_receipt_updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1IssuingTransactionUpdated(
+ Callback callback) {
+ this.register("v1.issuing_transaction.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1MandateUpdated(
+ Callback callback) {
+ this.register("v1.mandate.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentAmountCapturableUpdated(
+ Callback callback) {
+ this.register("v1.payment_intent.amount_capturable_updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentCanceled(
+ Callback callback) {
+ this.register("v1.payment_intent.canceled", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentCreated(
+ Callback callback) {
+ this.register("v1.payment_intent.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentPartiallyFunded(
+ Callback callback) {
+ this.register("v1.payment_intent.partially_funded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentPaymentFailed(
+ Callback callback) {
+ this.register("v1.payment_intent.payment_failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentProcessing(
+ Callback callback) {
+ this.register("v1.payment_intent.processing", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentRequiresAction(
+ Callback callback) {
+ this.register("v1.payment_intent.requires_action", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentIntentSucceeded(
+ Callback callback) {
+ this.register("v1.payment_intent.succeeded", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentLinkCreated(
+ Callback callback) {
+ this.register("v1.payment_link.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentLinkUpdated(
+ Callback callback) {
+ this.register("v1.payment_link.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentMethodAttached(
+ Callback callback) {
+ this.register("v1.payment_method.attached", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentMethodAutomaticallyUpdated(
+ Callback callback) {
+ this.register("v1.payment_method.automatically_updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentMethodDetached(
+ Callback callback) {
+ this.register("v1.payment_method.detached", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PaymentMethodUpdated(
+ Callback callback) {
+ this.register("v1.payment_method.updated", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PayoutCanceled(
+ Callback callback) {
+ this.register("v1.payout.canceled", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PayoutCreated(
+ Callback callback) {
+ this.register("v1.payout.created", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PayoutFailed(
+ Callback callback) {
+ this.register("v1.payout.failed", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PayoutPaid(
+ Callback callback) {
+ this.register("v1.payout.paid", callback);
+ return this;
+ }
+
+ public StripeEventNotificationHandler onV1PayoutReconciliationCompleted(
+ Callback