diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index 17557a68f28..1992b4523bf 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-e65e48569f6dfad2d5f1b58018017856520c3ae6
\ No newline at end of file
+273184f052dd3c191b1993098365d0c2437d2cb4
\ No newline at end of file
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 58dae793582..ad0b5d45105 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2186
\ No newline at end of file
+v2204
\ No newline at end of file
diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java
index ea101df091f..87fc548b515 100644
--- a/src/main/java/com/stripe/ApiVersion.java
+++ b/src/main/java/com/stripe/ApiVersion.java
@@ -2,6 +2,6 @@
package com.stripe;
final class ApiVersion {
- public static final String CURRENT = "2026-02-25.clover";
- public static final String CURRENT_MAJOR = "clover";
+ public static final String CURRENT = "2026-03-25.dahlia";
+ public static final String CURRENT_MAJOR = "dahlia";
}
diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java
index ba7bf85ff83..65a8ea43e97 100644
--- a/src/main/java/com/stripe/exception/StripeException.java
+++ b/src/main/java/com/stripe/exception/StripeException.java
@@ -110,6 +110,9 @@ public static StripeException parseV2Exception(
StripeResponseGetter responseGetter) {
switch (type) {
// The beginning of the section generated from our OpenAPI spec
+ case "rate_limit":
+ return com.stripe.exception.RateLimitException.parse(
+ body, statusCode, requestId, responseGetter);
case "temporary_session_expired":
return com.stripe.exception.TemporarySessionExpiredException.parse(
body, statusCode, requestId, responseGetter);
diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java
index de1986186f9..e3667b54ef6 100644
--- a/src/main/java/com/stripe/model/Account.java
+++ b/src/main/java/com/stripe/model/Account.java
@@ -24,7 +24,11 @@
import lombok.Setter;
/**
- * This is an object representing a Stripe account. You can retrieve it to see properties on the
+ * For new integrations, we recommend using the Accounts v2 API, in place of /v1/accounts and
+ * /v1/customers to represent a user.
+ *
+ *
This is an object representing a Stripe account. You can retrieve it to see properties on the
* account like its current requirements or if the account is enabled to make live charges or
* receive payouts.
*
@@ -1375,6 +1379,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("twint_payments")
String twintPayments;
+ /**
+ * The status of the upi payments capability of the account, or whether the account can directly
+ * process upi charges.
+ *
+ *
One of {@code active}, {@code inactive}, or {@code pending}.
+ */
+ @SerializedName("upi_payments")
+ String upiPayments;
+
/**
* The status of the US bank account ACH payments capability of the account, or whether the
* account can directly process US bank account charges.
diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java
index 3c3d6afa5d6..68e087e8dc2 100644
--- a/src/main/java/com/stripe/model/AccountSession.java
+++ b/src/main/java/com/stripe/model/AccountSession.java
@@ -58,8 +58,8 @@ public class AccountSession extends ApiResource {
Long expiresAt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/ApplePayDomain.java b/src/main/java/com/stripe/model/ApplePayDomain.java
index ca690b5f1e4..503b8b55b7d 100644
--- a/src/main/java/com/stripe/model/ApplePayDomain.java
+++ b/src/main/java/com/stripe/model/ApplePayDomain.java
@@ -37,8 +37,8 @@ public class ApplePayDomain extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java
index bac7b223119..0f4996b6172 100644
--- a/src/main/java/com/stripe/model/ApplicationFee.java
+++ b/src/main/java/com/stripe/model/ApplicationFee.java
@@ -82,8 +82,8 @@ public class ApplicationFee extends ApiResource implements BalanceTransactionSou
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java
index 0f4a9b3e8b3..9f30955461a 100644
--- a/src/main/java/com/stripe/model/Balance.java
+++ b/src/main/java/com/stripe/model/Balance.java
@@ -57,8 +57,8 @@ public class Balance extends ApiResource {
Issuing issuing;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/CashBalance.java b/src/main/java/com/stripe/model/CashBalance.java
index 1421ac2af88..333fb8d9120 100644
--- a/src/main/java/com/stripe/model/CashBalance.java
+++ b/src/main/java/com/stripe/model/CashBalance.java
@@ -42,8 +42,8 @@ public class CashBalance extends ApiResource {
String customerAccount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java
index 4cdabae123a..7696e6f7d72 100644
--- a/src/main/java/com/stripe/model/Charge.java
+++ b/src/main/java/com/stripe/model/Charge.java
@@ -171,8 +171,8 @@ public class Charge extends ApiResource implements MetadataStore, Balanc
Level3 level3;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -1319,6 +1319,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -2725,7 +2728,8 @@ public static class Crypto extends StripeObject {
/**
* The blockchain network that the transaction was sent on.
*
- * One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}.
+ *
One of {@code base}, {@code ethereum}, {@code polygon}, {@code solana}, or {@code
+ * tempo}.
*/
@SerializedName("network")
String network;
@@ -3999,6 +4003,19 @@ public static class Swish extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java
index a88f65376d0..9c8650a9fe6 100644
--- a/src/main/java/com/stripe/model/ConfirmationToken.java
+++ b/src/main/java/com/stripe/model/ConfirmationToken.java
@@ -48,8 +48,8 @@ public class ConfirmationToken extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -455,11 +455,14 @@ public static class PaymentMethodPreview extends StripeObject {
* nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code
* paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code revolut_pay},
* {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code swish},
- * {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
+ * {@code twint}, {@code upi}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -2289,6 +2292,19 @@ public static class Swish extends StripeObject {}
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/ConnectCollectionTransfer.java b/src/main/java/com/stripe/model/ConnectCollectionTransfer.java
index ad68da667ee..b0db6fbf75e 100644
--- a/src/main/java/com/stripe/model/ConnectCollectionTransfer.java
+++ b/src/main/java/com/stripe/model/ConnectCollectionTransfer.java
@@ -34,8 +34,8 @@ public class ConnectCollectionTransfer extends StripeObject implements BalanceTr
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Coupon.java b/src/main/java/com/stripe/model/Coupon.java
index af4892d5f42..5e03288f847 100644
--- a/src/main/java/com/stripe/model/Coupon.java
+++ b/src/main/java/com/stripe/model/Coupon.java
@@ -27,7 +27,7 @@
* href="https://api.stripe.com#invoices">invoices, checkout sessions, quotes, and more. Coupons do not work with conventional
- * one-off charges or charges or payment intents.
*/
@Getter
@@ -88,8 +88,8 @@ public class Coupon extends ApiResource implements HasId, MetadataStore
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java
index a1394ad15cd..15de92bdeec 100644
--- a/src/main/java/com/stripe/model/CreditNote.java
+++ b/src/main/java/com/stripe/model/CreditNote.java
@@ -105,8 +105,8 @@ public class CreditNote extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/**
* String representing the object's type. Objects of the same type share the same value.
*
diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java
index 309c0dadb5d..73e5995eba7 100644
--- a/src/main/java/com/stripe/model/Customer.java
+++ b/src/main/java/com/stripe/model/Customer.java
@@ -157,8 +157,8 @@ public class Customer extends ApiResource implements HasId, MetadataStore invoice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
index e2f606bfa66..a5dae90649f 100644
--- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
+++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
@@ -65,8 +65,8 @@ public class CustomerCashBalanceTransaction extends StripeObject
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java
index a69b1af5b58..af911fd0350 100644
--- a/src/main/java/com/stripe/model/CustomerSession.java
+++ b/src/main/java/com/stripe/model/CustomerSession.java
@@ -66,8 +66,8 @@ public class CustomerSession extends ApiResource {
Long expiresAt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java
index 0a7eb6eb085..81c63c24437 100644
--- a/src/main/java/com/stripe/model/Dispute.java
+++ b/src/main/java/com/stripe/model/Dispute.java
@@ -85,8 +85,8 @@ public class Dispute extends ApiResource
Boolean isChargeRefundable;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/EphemeralKey.java b/src/main/java/com/stripe/model/EphemeralKey.java
index 4c08df80bbb..15f830e636c 100644
--- a/src/main/java/com/stripe/model/EphemeralKey.java
+++ b/src/main/java/com/stripe/model/EphemeralKey.java
@@ -33,8 +33,8 @@ public class EphemeralKey extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java
index b210dad8075..07e35ad21e7 100644
--- a/src/main/java/com/stripe/model/Event.java
+++ b/src/main/java/com/stripe/model/Event.java
@@ -72,8 +72,8 @@ public class Event extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/FileLink.java b/src/main/java/com/stripe/model/FileLink.java
index 91bb8e94440..af577446b2d 100644
--- a/src/main/java/com/stripe/model/FileLink.java
+++ b/src/main/java/com/stripe/model/FileLink.java
@@ -51,8 +51,8 @@ public class FileLink extends ApiResource implements HasId, MetadataStorefinalize the invoice, which
- * allows you to pay or finalize the invoice, which allows
+ * you to pay or send the invoice to your customers.
*/
public static Invoice create(Map params) throws StripeException {
@@ -987,8 +987,8 @@ public static Invoice create(Map params) throws StripeException
/**
* This endpoint creates a draft invoice for a given customer. The invoice remains a draft until
- * you finalize the invoice, which
- * allows you to pay or finalize the invoice, which allows
+ * you to pay or send the invoice to your customers.
*/
public static Invoice create(Map params, RequestOptions options)
@@ -1001,8 +1001,8 @@ public static Invoice create(Map params, RequestOptions options)
/**
* This endpoint creates a draft invoice for a given customer. The invoice remains a draft until
- * you finalize the invoice, which
- * allows you to pay or finalize the invoice, which allows
+ * you to pay or send the invoice to your customers.
*/
public static Invoice create(InvoiceCreateParams params) throws StripeException {
@@ -1011,8 +1011,8 @@ public static Invoice create(InvoiceCreateParams params) throws StripeException
/**
* This endpoint creates a draft invoice for a given customer. The invoice remains a draft until
- * you finalize the invoice, which
- * allows you to pay or finalize the invoice, which allows
+ * you to pay or send the invoice to your customers.
*/
public static Invoice create(InvoiceCreateParams params, RequestOptions options)
@@ -1215,7 +1215,7 @@ public static Invoice createPreview(InvoiceCreatePreviewParams params, RequestOp
* Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices
* that are no longer in a draft state will fail; once an invoice has been finalized or if an
* invoice is for a subscription, it must be voided.
+ * href="https://stripe.com/api/invoices/void">voided.
*/
public Invoice delete() throws StripeException {
return delete((Map) null, (RequestOptions) null);
@@ -1225,7 +1225,7 @@ public Invoice delete() throws StripeException {
* Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices
* that are no longer in a draft state will fail; once an invoice has been finalized or if an
* invoice is for a subscription, it must be voided.
+ * href="https://stripe.com/api/invoices/void">voided.
*/
public Invoice delete(RequestOptions options) throws StripeException {
return delete((Map) null, options);
@@ -1235,7 +1235,7 @@ public Invoice delete(RequestOptions options) throws StripeException {
* Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices
* that are no longer in a draft state will fail; once an invoice has been finalized or if an
* invoice is for a subscription, it must be voided.
+ * href="https://stripe.com/api/invoices/void">voided.
*/
public Invoice delete(Map params) throws StripeException {
return delete(params, (RequestOptions) null);
@@ -1245,7 +1245,7 @@ public Invoice delete(Map params) throws StripeException {
* Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices
* that are no longer in a draft state will fail; once an invoice has been finalized or if an
* invoice is for a subscription, it must be voided.
+ * href="https://stripe.com/api/invoices/void">voided.
*/
public Invoice delete(Map params, RequestOptions options) throws StripeException {
String path = String.format("/v1/invoices/%s", ApiResource.urlEncodeId(this.getId()));
@@ -1866,14 +1866,14 @@ public Invoice updateLines(InvoiceUpdateLinesParams params, RequestOptions optio
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice() throws StripeException {
return voidInvoice((Map) null, (RequestOptions) null);
@@ -1881,14 +1881,14 @@ public Invoice voidInvoice() throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(RequestOptions options) throws StripeException {
return voidInvoice((Map) null, options);
@@ -1896,14 +1896,14 @@ public Invoice voidInvoice(RequestOptions options) throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(Map params) throws StripeException {
return voidInvoice(params, (RequestOptions) null);
@@ -1911,14 +1911,14 @@ public Invoice voidInvoice(Map params) throws StripeException {
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(Map params, RequestOptions options)
throws StripeException {
@@ -1930,14 +1930,14 @@ public Invoice voidInvoice(Map params, RequestOptions options)
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
* Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(InvoiceVoidInvoiceParams params) throws StripeException {
return voidInvoice(params, (RequestOptions) null);
@@ -1945,14 +1945,14 @@ public Invoice voidInvoice(InvoiceVoidInvoiceParams params) throws StripeExcepti
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to
+ * href="https://stripe.com/api/invoices/delete">deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be found.
*
*
Consult with local regulations to determine whether and how an invoice might be amended,
* canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe
- * recommends that you consult with your legal counsel for advice specific to your business.
+ * href="https://stripe.com/api/invoices/create">issue another invoice or credit note instead. Stripe recommends
+ * that you consult with your legal counsel for advice specific to your business.
*/
public Invoice voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions options)
throws StripeException {
@@ -2403,7 +2403,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -2622,7 +2622,7 @@ public static class UsBankAccount extends StripeObject {
FinancialConnections financialConnections;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java
index bbeaf8177ea..5e8deefa4ea 100644
--- a/src/main/java/com/stripe/model/InvoiceItem.java
+++ b/src/main/java/com/stripe/model/InvoiceItem.java
@@ -104,8 +104,8 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore invoice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -156,12 +156,21 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStoreAPI
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param refers
+ * to the exact amount to be charged in future payments. If {@code maximum}, the amount
+ * charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
index 408fd3ea88d..362936cd851 100644
--- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java
+++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java
@@ -85,8 +85,8 @@ public class PaymentAttemptRecord extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -570,6 +570,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1365,6 +1368,38 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("authentication_flow")
String authenticationFlow;
+ /**
+ * The 3D Secure cryptogram, also known as the "authentication value" (AAV, CAVV
+ * or AEVV).
+ */
+ @SerializedName("cryptogram")
+ String cryptogram;
+
+ /**
+ * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
+ * authentication was performed.
+ *
+ * One of {@code 01}, {@code 02}, {@code 03}, {@code 04}, {@code 05}, {@code 06}, or
+ * {@code 07}.
+ */
+ @SerializedName("electronic_commerce_indicator")
+ String electronicCommerceIndicator;
+
+ /**
+ * The exemption requested via 3DS and accepted by the issuer at authentication time.
+ *
+ *
One of {@code low_risk}, or {@code none}.
+ */
+ @SerializedName("exemption_indicator")
+ String exemptionIndicator;
+
+ /**
+ * Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
+ * This will depend on the outcome of Stripe's internal risk assessment.
+ */
+ @SerializedName("exemption_indicator_applied")
+ Boolean exemptionIndicatorApplied;
+
/**
* Indicates the outcome of 3D Secure authentication.
*
@@ -1780,7 +1815,8 @@ public static class Crypto extends StripeObject {
/**
* The blockchain network that the transaction was sent on.
*
- *
One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}.
+ *
One of {@code base}, {@code ethereum}, {@code polygon}, {@code solana}, or {@code
+ * tempo}.
*/
@SerializedName("network")
String network;
@@ -3074,6 +3110,19 @@ public static class Swish extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java
index 09647e1a84b..9b9a4d0f406 100644
--- a/src/main/java/com/stripe/model/PaymentIntent.java
+++ b/src/main/java/com/stripe/model/PaymentIntent.java
@@ -222,8 +222,8 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore
latestCharge;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -587,9 +587,9 @@ public PaymentIntent applyCustomerBalance(
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- *
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel() throws StripeException {
return cancel((Map) null, (RequestOptions) null);
@@ -605,9 +605,9 @@ public PaymentIntent cancel() throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(RequestOptions options) throws StripeException {
return cancel((Map) null, options);
@@ -623,9 +623,9 @@ public PaymentIntent cancel(RequestOptions options) throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(Map params) throws StripeException {
return cancel(params, (RequestOptions) null);
@@ -641,9 +641,9 @@ public PaymentIntent cancel(Map params) throws StripeException {
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(Map params, RequestOptions options)
throws StripeException {
@@ -664,9 +664,9 @@ public PaymentIntent cancel(Map params, RequestOptions options)
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- * You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeException {
return cancel(params, (RequestOptions) null);
@@ -682,9 +682,9 @@ public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeExcep
* on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
* requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
*
- *
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead.
+ *
You can directly cancel the PaymentIntent for a Checkout Session only when the PaymentIntent
+ * has a status of {@code requires_capture}. Otherwise, you must expire the Checkout Session.
*/
public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions options)
throws StripeException {
@@ -1777,6 +1777,9 @@ public static class NextAction extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi_handle_redirect_or_display_qr_code")
+ UpiHandleRedirectOrDisplayQrCode upiHandleRedirectOrDisplayQrCode;
+
/**
* When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this
* dictionary to invoke authentication flows. The shape of the contents is subject to change and
@@ -2536,6 +2539,45 @@ public static class QrCode extends StripeObject {
}
}
+ /**
+ * For more details about UpiHandleRedirectOrDisplayQrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiHandleRedirectOrDisplayQrCode extends StripeObject {
+ /**
+ * The URL to the hosted UPI instructions page, which allows customers to view the QR code.
+ */
+ @SerializedName("hosted_instructions_url")
+ String hostedInstructionsUrl;
+
+ @SerializedName("qr_code")
+ QrCode qrCode;
+
+ /**
+ * For more details about QrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class QrCode extends StripeObject {
+ /** The date (unix timestamp) when the QR code expires. */
+ @SerializedName("expires_at")
+ Long expiresAt;
+
+ /** The image_url_png string used to render QR code. */
+ @SerializedName("image_url_png")
+ String imageUrlPng;
+
+ /** The image_url_svg string used to render QR code. */
+ @SerializedName("image_url_svg")
+ String imageUrlSvg;
+ }
+ }
+
/**
* For more details about VerifyWithMicrodeposits, please refer to the API Reference.
@@ -2864,6 +2906,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -2917,7 +2962,7 @@ public static class AcssDebit extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -3610,7 +3655,7 @@ public static class Plan extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -5106,6 +5151,39 @@ public static class Twint extends StripeObject {
String setupFutureUsage;
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /**
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ *
+ *
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
+ * Customer after the PaymentIntent is confirmed and the customer completes any required
+ * actions. If you don't provide a Customer, you can still attach the payment method to a
+ * Customer after the transaction completes.
+ *
+ *
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
+ * and attaches a generated_card
+ * payment method representing the card to the Customer instead.
+ *
+ *
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
+ * with regional legislation and network rules, such as SCA.
+ *
+ *
One of {@code off_session}, or {@code on_session}.
+ */
+ @SerializedName("setup_future_usage")
+ String setupFutureUsage;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -5120,14 +5198,6 @@ public static class UsBankAccount extends StripeObject {
@SerializedName("mandate_options")
MandateOptions mandateOptions;
- /**
- * Preferred transaction settlement speed
- *
- *
One of {@code fastest}, or {@code standard}.
- */
- @SerializedName("preferred_settlement_speed")
- String preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -5169,7 +5239,7 @@ public static class UsBankAccount extends StripeObject {
String transactionPurpose;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java
index d6282f9987d..9f7355b6fca 100644
--- a/src/main/java/com/stripe/model/PaymentLink.java
+++ b/src/main/java/com/stripe/model/PaymentLink.java
@@ -130,8 +130,8 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStoreAPI
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -2746,6 +2762,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(sofort, responseGetter);
trySetResponseGetter(swish, responseGetter);
trySetResponseGetter(twint, responseGetter);
+ trySetResponseGetter(upi, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
index 4a75410a343..1b75dc97f7f 100644
--- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
+++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java
@@ -160,8 +160,8 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
Link link;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -245,6 +245,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -3009,6 +3012,57 @@ public static class DisplayPreference extends StripeObject {
}
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /**
+ * Whether this payment method may be offered at checkout. True if {@code display_preference} is
+ * {@code on} and the payment method's capability is active.
+ */
+ @SerializedName("available")
+ Boolean available;
+
+ @SerializedName("display_preference")
+ DisplayPreference displayPreference;
+
+ /**
+ * For more details about DisplayPreference, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class DisplayPreference extends StripeObject {
+ /**
+ * For child configs, whether or not the account's preference will be observed. If {@code
+ * false}, the parent configuration's default is used.
+ */
+ @SerializedName("overridable")
+ Boolean overridable;
+
+ /**
+ * The account's display preference.
+ *
+ * One of {@code none}, {@code off}, or {@code on}.
+ */
+ @SerializedName("preference")
+ String preference;
+
+ /**
+ * The effective display preference value.
+ *
+ *
One of {@code off}, or {@code on}.
+ */
+ @SerializedName("value")
+ String value;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -3216,6 +3270,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(sofort, responseGetter);
trySetResponseGetter(swish, responseGetter);
trySetResponseGetter(twint, responseGetter);
+ trySetResponseGetter(upi, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
diff --git a/src/main/java/com/stripe/model/PaymentMethodDomain.java b/src/main/java/com/stripe/model/PaymentMethodDomain.java
index 9343eb0023a..cd7a01b69b1 100644
--- a/src/main/java/com/stripe/model/PaymentMethodDomain.java
+++ b/src/main/java/com/stripe/model/PaymentMethodDomain.java
@@ -73,8 +73,8 @@ public class PaymentMethodDomain extends ApiResource implements HasId {
Link link;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java
index ac5d09f6900..c7d836c5b36 100644
--- a/src/main/java/com/stripe/model/PaymentRecord.java
+++ b/src/main/java/com/stripe/model/PaymentRecord.java
@@ -96,8 +96,8 @@ public class PaymentRecord extends ApiResource implements HasId {
String latestPaymentAttemptRecord;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -872,6 +872,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1667,6 +1670,38 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("authentication_flow")
String authenticationFlow;
+ /**
+ * The 3D Secure cryptogram, also known as the "authentication value" (AAV, CAVV
+ * or AEVV).
+ */
+ @SerializedName("cryptogram")
+ String cryptogram;
+
+ /**
+ * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
+ * authentication was performed.
+ *
+ *
One of {@code 01}, {@code 02}, {@code 03}, {@code 04}, {@code 05}, {@code 06}, or
+ * {@code 07}.
+ */
+ @SerializedName("electronic_commerce_indicator")
+ String electronicCommerceIndicator;
+
+ /**
+ * The exemption requested via 3DS and accepted by the issuer at authentication time.
+ *
+ *
One of {@code low_risk}, or {@code none}.
+ */
+ @SerializedName("exemption_indicator")
+ String exemptionIndicator;
+
+ /**
+ * Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
+ * This will depend on the outcome of Stripe's internal risk assessment.
+ */
+ @SerializedName("exemption_indicator_applied")
+ Boolean exemptionIndicatorApplied;
+
/**
* Indicates the outcome of 3D Secure authentication.
*
@@ -2082,7 +2117,8 @@ public static class Crypto extends StripeObject {
/**
* The blockchain network that the transaction was sent on.
*
- *
One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}.
+ *
One of {@code base}, {@code ethereum}, {@code polygon}, {@code solana}, or {@code
+ * tempo}.
*/
@SerializedName("network")
String network;
@@ -3376,6 +3412,19 @@ public static class Swish extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Twint extends StripeObject {}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ /** Customer's unique Virtual Payment Address. */
+ @SerializedName("vpa")
+ String vpa;
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/PaymentSourceCollection.java b/src/main/java/com/stripe/model/PaymentSourceCollection.java
index 7976909856a..f651147d3ae 100644
--- a/src/main/java/com/stripe/model/PaymentSourceCollection.java
+++ b/src/main/java/com/stripe/model/PaymentSourceCollection.java
@@ -19,8 +19,8 @@ public class PaymentSourceCollection extends StripeCollection {
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -32,8 +32,8 @@ public PaymentSource create(Map params) throws StripeException {
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(Map params, RequestOptions options)
throws StripeException {
@@ -49,8 +49,8 @@ public PaymentSource create(Map params, RequestOptions options)
*
* If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(PaymentSourceCollectionCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -62,8 +62,8 @@ public PaymentSource create(PaymentSourceCollectionCreateParams params) throws S
*
*
If the card’s owner has no default card, then the new card will become the default. However,
* if the owner already has a default, then it will not change. To change the default, you should
- * update the customer to have a new
- * {@code default_source}.
+ * update the customer to have a new {@code
+ * default_source}.
*/
public PaymentSource create(PaymentSourceCollectionCreateParams params, RequestOptions options)
throws StripeException {
diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java
index a7015e9eefc..9aded0baefb 100644
--- a/src/main/java/com/stripe/model/Payout.java
+++ b/src/main/java/com/stripe/model/Payout.java
@@ -128,8 +128,8 @@ public class Payout extends ApiResource implements MetadataStore, Balanc
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -403,8 +403,8 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -420,8 +420,8 @@ public static Payout create(Map params) throws StripeException {
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(Map params, RequestOptions options)
throws StripeException {
@@ -441,8 +441,8 @@ public static Payout create(Map params, RequestOptions options)
*
* If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(PayoutCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
@@ -458,8 +458,8 @@ public static Payout create(PayoutCreateParams params) throws StripeException {
*
*
If you create a manual payout on a Stripe account that uses multiple payment source types,
* you need to specify the source type balance that the payout draws from. The balance object details available and
- * pending amounts by source type.
+ * href="https://stripe.com/api/balances/object">balance object details available and pending
+ * amounts by source type.
*/
public static Payout create(PayoutCreateParams params, RequestOptions options)
throws StripeException {
diff --git a/src/main/java/com/stripe/model/Plan.java b/src/main/java/com/stripe/model/Plan.java
index 99a23a59c21..3276b347c69 100644
--- a/src/main/java/com/stripe/model/Plan.java
+++ b/src/main/java/com/stripe/model/Plan.java
@@ -110,8 +110,8 @@ public class Plan extends ApiResource implements HasId, MetadataStore {
Long intervalCount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Price.java b/src/main/java/com/stripe/model/Price.java
index ebfc1851480..631bed095e9 100644
--- a/src/main/java/com/stripe/model/Price.java
+++ b/src/main/java/com/stripe/model/Price.java
@@ -95,8 +95,8 @@ public class Price extends ApiResource implements HasId, MetadataStore {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Product.java b/src/main/java/com/stripe/model/Product.java
index 62d297b6471..1981d9a2989 100644
--- a/src/main/java/com/stripe/model/Product.java
+++ b/src/main/java/com/stripe/model/Product.java
@@ -78,8 +78,8 @@ public class Product extends ApiResource implements HasId, MetadataStore images;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/ProductFeature.java b/src/main/java/com/stripe/model/ProductFeature.java
index 5a28860688b..25e208389ce 100644
--- a/src/main/java/com/stripe/model/ProductFeature.java
+++ b/src/main/java/com/stripe/model/ProductFeature.java
@@ -45,8 +45,8 @@ public class ProductFeature extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/PromotionCode.java b/src/main/java/com/stripe/model/PromotionCode.java
index 07257537e10..1dc8bc05a09 100644
--- a/src/main/java/com/stripe/model/PromotionCode.java
+++ b/src/main/java/com/stripe/model/PromotionCode.java
@@ -71,8 +71,8 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore {
LineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Review.java b/src/main/java/com/stripe/model/Review.java
index c3487280d94..ec652c28ac5 100644
--- a/src/main/java/com/stripe/model/Review.java
+++ b/src/main/java/com/stripe/model/Review.java
@@ -68,8 +68,8 @@ public class Review extends ApiResource implements HasId {
IpAddressLocation ipAddressLocation;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java
index 3d7a6f58788..c3818f96c22 100644
--- a/src/main/java/com/stripe/model/SetupAttempt.java
+++ b/src/main/java/com/stripe/model/SetupAttempt.java
@@ -84,8 +84,8 @@ public class SetupAttempt extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -347,6 +347,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1083,6 +1086,15 @@ public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) {
}
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {}
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java
index fad324c5a15..4818fc82884 100644
--- a/src/main/java/com/stripe/model/SetupIntent.java
+++ b/src/main/java/com/stripe/model/SetupIntent.java
@@ -151,8 +151,8 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore latestAttempt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -887,6 +887,9 @@ public static class NextAction extends StripeObject {
@SerializedName("type")
String type;
+ @SerializedName("upi_handle_redirect_or_display_qr_code")
+ UpiHandleRedirectOrDisplayQrCode upiHandleRedirectOrDisplayQrCode;
+
/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this
* dictionary to invoke authentication flows. The shape of the contents is subject to change and
@@ -962,6 +965,45 @@ public static class RedirectToUrl extends StripeObject {
String url;
}
+ /**
+ * For more details about UpiHandleRedirectOrDisplayQrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiHandleRedirectOrDisplayQrCode extends StripeObject {
+ /**
+ * The URL to the hosted UPI instructions page, which allows customers to view the QR code.
+ */
+ @SerializedName("hosted_instructions_url")
+ String hostedInstructionsUrl;
+
+ @SerializedName("qr_code")
+ QrCode qrCode;
+
+ /**
+ * For more details about QrCode, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class QrCode extends StripeObject {
+ /** The date (unix timestamp) when the QR code expires. */
+ @SerializedName("expires_at")
+ Long expiresAt;
+
+ /** The image_url_png string used to render QR code. */
+ @SerializedName("image_url_png")
+ String imageUrlPng;
+
+ /** The image_url_svg string used to render QR code. */
+ @SerializedName("image_url_svg")
+ String imageUrlSvg;
+ }
+ }
+
/**
* For more details about VerifyWithMicrodeposits, please refer to the API Reference.
@@ -1048,6 +1090,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -1071,7 +1116,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
* One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -1200,7 +1245,7 @@ public static class Card extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -1431,6 +1476,50 @@ public static class MandateOptions extends StripeObject {
}
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -1446,7 +1535,7 @@ public static class UsBankAccount extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/ShippingRate.java b/src/main/java/com/stripe/model/ShippingRate.java
index 4615d03b48a..e3fa070698f 100644
--- a/src/main/java/com/stripe/model/ShippingRate.java
+++ b/src/main/java/com/stripe/model/ShippingRate.java
@@ -58,8 +58,8 @@ public class ShippingRate extends ApiResource implements HasId, MetadataStore, Paymen
Klarna klarna;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SourceMandateNotification.java b/src/main/java/com/stripe/model/SourceMandateNotification.java
index 6a1c794cbb3..47cf5d94eac 100644
--- a/src/main/java/com/stripe/model/SourceMandateNotification.java
+++ b/src/main/java/com/stripe/model/SourceMandateNotification.java
@@ -39,8 +39,8 @@ public class SourceMandateNotification extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/SourceTransaction.java b/src/main/java/com/stripe/model/SourceTransaction.java
index 9d6a74069e8..01b1a8dd349 100644
--- a/src/main/java/com/stripe/model/SourceTransaction.java
+++ b/src/main/java/com/stripe/model/SourceTransaction.java
@@ -49,8 +49,8 @@ public class SourceTransaction extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java
index b2512570209..6892954c27e 100644
--- a/src/main/java/com/stripe/model/StripeError.java
+++ b/src/main/java/com/stripe/model/StripeError.java
@@ -95,7 +95,8 @@ public class StripeError extends StripeObject {
* refer_to_customer}, {@code refund_disputed_payment}, {@code request_blocked}, {@code
* resource_already_exists}, {@code resource_missing}, {@code return_intent_already_processed},
* {@code routing_number_invalid}, {@code secret_key_required}, {@code sepa_unsupported_account},
- * {@code setup_attempt_failed}, {@code setup_intent_authentication_failure}, {@code
+ * {@code service_period_coupon_with_metered_tiered_item_unsupported}, {@code
+ * setup_attempt_failed}, {@code setup_intent_authentication_failure}, {@code
* setup_intent_invalid_parameter}, {@code setup_intent_mandate_invalid}, {@code
* setup_intent_mobile_wallet_unsupported}, {@code setup_intent_setup_attempt_expired}, {@code
* setup_intent_unexpected_state}, {@code shipping_address_invalid}, {@code
diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java
index c776a96e6b0..f955227972f 100644
--- a/src/main/java/com/stripe/model/Subscription.java
+++ b/src/main/java/com/stripe/model/Subscription.java
@@ -216,8 +216,8 @@ public class Subscription extends ApiResource implements HasId, MetadataStore latestInvoice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -272,8 +272,8 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreCreate an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
@SerializedName("pending_invoice_item_interval")
PendingInvoiceItemInterval pendingInvoiceItemInterval;
@@ -590,9 +590,9 @@ public void setDiscountObjects(List objs) {
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -612,9 +612,9 @@ public Subscription cancel() throws StripeException {
* href="https://stripe.com/metadata">metadata.
*
*
Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -634,9 +634,9 @@ public Subscription cancel(Map params) throws StripeException {
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -660,9 +660,9 @@ public Subscription cancel(Map params, RequestOptions options)
* href="https://stripe.com/metadata">metadata.
*
* Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -682,9 +682,9 @@ public Subscription cancel(SubscriptionCancelParams params) throws StripeExcepti
* href="https://stripe.com/metadata">metadata.
*
*
Any pending invoice items that you’ve created are still charged at the end of the period,
- * unless manually deleted. If you’ve
- * set the subscription to cancel at the end of the period, any pending prorations are also left
- * in place and collected at the end of the period. But if the subscription is set to cancel
+ * unless manually deleted. If you’ve set
+ * the subscription to cancel at the end of the period, any pending prorations are also left in
+ * place and collected at the end of the period. But if the subscription is set to cancel
* immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both
* set to true.
*
@@ -1493,8 +1493,8 @@ public static class CancellationDetails extends StripeObject {
/**
* Why this subscription was canceled.
*
- *
One of {@code cancellation_requested}, {@code payment_disputed}, or {@code
- * payment_failed}.
+ *
One of {@code canceled_by_retention_policy}, {@code cancellation_requested}, {@code
+ * payment_disputed}, or {@code payment_failed}.
*/
@SerializedName("reason")
String reason;
@@ -1613,8 +1613,9 @@ public void setAccountObject(Account expandableObject) {
@EqualsAndHashCode(callSuper = false)
public static class PauseCollection extends StripeObject {
/**
- * The payment collection behavior for this subscription while paused. One of {@code
- * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * The payment collection behavior for this subscription while paused.
+ *
+ *
One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
*/
@SerializedName("behavior")
String behavior;
@@ -1731,7 +1732,7 @@ public static class AcssDebit extends StripeObject {
MandateOptions mandateOptions;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -1815,7 +1816,7 @@ public static class Card extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -1972,7 +1973,7 @@ public static class UsBankAccount extends StripeObject {
FinancialConnections financialConnections;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java
index 1c2d16086cb..1bcf7b31798 100644
--- a/src/main/java/com/stripe/model/SubscriptionSchedule.java
+++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java
@@ -101,8 +101,8 @@ public class SubscriptionSchedule extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java
index 7dbecfd4452..d21285fdced 100644
--- a/src/main/java/com/stripe/model/TaxId.java
+++ b/src/main/java/com/stripe/model/TaxId.java
@@ -58,8 +58,8 @@ public class TaxId extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java
index af094958079..72799fe33e5 100644
--- a/src/main/java/com/stripe/model/TaxRate.java
+++ b/src/main/java/com/stripe/model/TaxRate.java
@@ -108,8 +108,8 @@ public class TaxRate extends ApiResource implements HasId, MetadataStore, BalanceT
/**
* Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
+ * href="https://stripe.com/api/errors">the errors section for a list of codes).
*/
@SerializedName("failure_code")
String failureCode;
@@ -82,8 +82,8 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/Transfer.java b/src/main/java/com/stripe/model/Transfer.java
index af66f5c27e9..ca0f483a1b7 100644
--- a/src/main/java/com/stripe/model/Transfer.java
+++ b/src/main/java/com/stripe/model/Transfer.java
@@ -90,8 +90,8 @@ public class Transfer extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/WebhookEndpoint.java b/src/main/java/com/stripe/model/WebhookEndpoint.java
index 71157bb11f3..4ae148715a9 100644
--- a/src/main/java/com/stripe/model/WebhookEndpoint.java
+++ b/src/main/java/com/stripe/model/WebhookEndpoint.java
@@ -65,8 +65,8 @@ public class WebhookEndpoint extends ApiResource implements HasId, MetadataStore
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/apps/Secret.java b/src/main/java/com/stripe/model/apps/Secret.java
index 66e91925646..72a3e98dc19 100644
--- a/src/main/java/com/stripe/model/apps/Secret.java
+++ b/src/main/java/com/stripe/model/apps/Secret.java
@@ -60,8 +60,8 @@ public class Secret extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/Alert.java b/src/main/java/com/stripe/model/billing/Alert.java
index 437bee7c5a4..ec0f04e7b9e 100644
--- a/src/main/java/com/stripe/model/billing/Alert.java
+++ b/src/main/java/com/stripe/model/billing/Alert.java
@@ -48,8 +48,8 @@ public class Alert extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/AlertTriggered.java b/src/main/java/com/stripe/model/billing/AlertTriggered.java
index c02dc2f80d7..00af8da00b5 100644
--- a/src/main/java/com/stripe/model/billing/AlertTriggered.java
+++ b/src/main/java/com/stripe/model/billing/AlertTriggered.java
@@ -28,8 +28,8 @@ public class AlertTriggered extends StripeObject {
String customer;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
index 3a6ba11a814..a4639382c79 100644
--- a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
+++ b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java
@@ -42,8 +42,8 @@ public class CreditBalanceSummary extends ApiResource {
String customerAccount;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java b/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
index 03364483471..dff06b1f5ee 100644
--- a/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
+++ b/src/main/java/com/stripe/model/billing/CreditBalanceTransaction.java
@@ -57,8 +57,8 @@ public class CreditBalanceTransaction extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java
index f7475e96231..383ceb6d43c 100644
--- a/src/main/java/com/stripe/model/billing/CreditGrant.java
+++ b/src/main/java/com/stripe/model/billing/CreditGrant.java
@@ -82,8 +82,8 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStoreOne of {@code custom}, {@code embedded}, or {@code hosted}.
+ * One of {@code custom}, {@code elements}, {@code embedded}, {@code embedded_page}, {@code
+ * form}, {@code hosted}, or {@code hosted_page}.
*/
@SerializedName("ui_mode")
String uiMode;
@@ -2092,6 +2100,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("twint")
Twint twint;
+ @SerializedName("upi")
+ Upi upi;
+
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -2147,7 +2158,7 @@ public static class AcssDebit extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, {@code instant}, or {@code microdeposits}.
*/
@@ -3879,6 +3890,74 @@ public static class Twint extends StripeObject {
String setupFutureUsage;
}
+ /**
+ * For more details about Upi, please refer to the API
+ * Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi extends StripeObject {
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ /**
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ *
+ *
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
+ * Customer after the PaymentIntent is confirmed and the customer completes any required
+ * actions. If you don't provide a Customer, you can still attach the payment method to a
+ * Customer after the transaction completes.
+ *
+ *
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
+ * and attaches a generated_card
+ * payment method representing the card to the Customer instead.
+ *
+ *
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
+ * with regional legislation and network rules, such as SCA.
+ *
+ *
One of {@code none}, {@code off_session}, or {@code on_session}.
+ */
+ @SerializedName("setup_future_usage")
+ String setupFutureUsage;
+
+ /**
+ * For more details about MandateOptions, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions extends StripeObject {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ String amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+ }
+ }
+
/**
* For more details about UsBankAccount, please refer to the API Reference.
@@ -3923,7 +4002,7 @@ public static class UsBankAccount extends StripeObject {
String targetDate;
/**
- * Bank account verification method.
+ * Bank account verification method. The default value is {@code automatic}.
*
*
One of {@code automatic}, or {@code instant}.
*/
diff --git a/src/main/java/com/stripe/model/climate/Supplier.java b/src/main/java/com/stripe/model/climate/Supplier.java
index c83382ccbf1..2403d5ad3ca 100644
--- a/src/main/java/com/stripe/model/climate/Supplier.java
+++ b/src/main/java/com/stripe/model/climate/Supplier.java
@@ -59,8 +59,8 @@ public class Supplier extends ApiResource implements HasId {
/**
* The scientific pathway used for carbon removal.
*
- *
One of {@code biomass_carbon_removal_and_storage}, {@code direct_air_capture}, or {@code
- * enhanced_weathering}.
+ *
One of {@code biomass_carbon_removal_and_storage}, {@code direct_air_capture}, {@code
+ * enhanced_weathering}, or {@code marine_carbon_removal}.
*/
@SerializedName("removal_pathway")
String removalPathway;
diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
index c8a5182648e..818cc808316 100644
--- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
+++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java
@@ -38,8 +38,8 @@ public class ActiveEntitlement extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
index ea98118e538..111f2efad8b 100644
--- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
+++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlementSummary.java
@@ -21,8 +21,8 @@ public class ActiveEntitlementSummary extends StripeObject {
ActiveEntitlementCollection entitlements;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/entitlements/Feature.java b/src/main/java/com/stripe/model/entitlements/Feature.java
index b6caf0e5936..4abcd771a4c 100644
--- a/src/main/java/com/stripe/model/entitlements/Feature.java
+++ b/src/main/java/com/stripe/model/entitlements/Feature.java
@@ -41,8 +41,8 @@ public class Feature extends ApiResource implements HasId, MetadataStore lastVerificationReport;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java
index 80c1efef7f7..de680af9e89 100644
--- a/src/main/java/com/stripe/model/issuing/Authorization.java
+++ b/src/main/java/com/stripe/model/issuing/Authorization.java
@@ -130,8 +130,8 @@ public class Authorization extends ApiResource
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java
index 0b4eca67064..e66d781f222 100644
--- a/src/main/java/com/stripe/model/issuing/Card.java
+++ b/src/main/java/com/stripe/model/issuing/Card.java
@@ -112,8 +112,16 @@ public class Card extends ApiResource implements HasId, MetadataStore {
LatestFraudWarning latestFraudWarning;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our documentation for more
+ * details.
+ */
+ @SerializedName("lifecycle_controls")
+ LifecycleControls lifecycleControls;
+
+ /**
+ * 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;
@@ -443,6 +451,35 @@ public static class LatestFraudWarning extends StripeObject {
String type;
}
+ /**
+ * For more details about LifecycleControls, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class LifecycleControls extends StripeObject {
+ @SerializedName("cancel_after")
+ CancelAfter cancelAfter;
+
+ /**
+ * For more details about CancelAfter, please refer to the API Reference.
+ */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class CancelAfter extends StripeObject {
+ /**
+ * The card is automatically cancelled when it makes this number of non-zero payment
+ * authorizations and transactions. The count includes penny authorizations, but doesn't
+ * include non-payment actions, such as authorization advice.
+ */
+ @SerializedName("payment_count")
+ Long paymentCount;
+ }
+ }
+
/**
* For more details about Shipping, please refer to the API
* Reference.
@@ -1073,6 +1110,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(cardholder, responseGetter);
trySetResponseGetter(latestFraudWarning, responseGetter);
+ trySetResponseGetter(lifecycleControls, responseGetter);
trySetResponseGetter(personalizationDesign, responseGetter);
trySetResponseGetter(replacedBy, responseGetter);
trySetResponseGetter(replacementFor, responseGetter);
diff --git a/src/main/java/com/stripe/model/issuing/Cardholder.java b/src/main/java/com/stripe/model/issuing/Cardholder.java
index 6c0c016ee23..190e599df97 100644
--- a/src/main/java/com/stripe/model/issuing/Cardholder.java
+++ b/src/main/java/com/stripe/model/issuing/Cardholder.java
@@ -62,8 +62,8 @@ public class Cardholder extends ApiResource implements HasId, MetadataStoreOne of {@code block}, or {@code continue}.
+ */
+ @SerializedName("recommended_action")
+ String recommendedAction;
+
+ /** Collection of signals for this payment evaluation. */
+ @SerializedName("signals")
+ Signals signals;
+
/**
* Request a Radar API fraud risk score from Stripe for a payment before sending it for external
* processor authorization.
@@ -349,42 +359,6 @@ public static class UserInterventionResolved extends StripeObject {
}
}
- /** Collection of scores and insights for this payment evaluation. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Insights extends StripeObject {
- /** The timestamp when the evaluation was performed. */
- @SerializedName("evaluated_at")
- Long evaluatedAt;
-
- /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */
- @SerializedName("fraudulent_dispute")
- FraudulentDispute fraudulentDispute;
-
- /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class FraudulentDispute extends StripeObject {
- /**
- * Recommended action based on the risk score. Possible values are {@code block} and {@code
- * continue}.
- *
- * One of {@code block}, or {@code continue}.
- */
- @SerializedName("recommended_action")
- String recommendedAction;
-
- /**
- * Stripe Radar’s evaluation of the risk level of the payment. Possible values for evaluated
- * payments are between 0 and 100, with higher scores indicating higher risk.
- */
- @SerializedName("risk_score")
- Long riskScore;
- }
- }
-
/** Outcome details for this payment evaluation. */
@Getter
@Setter
@@ -757,13 +731,49 @@ public static class Address extends StripeObject {
}
}
+ /** Collection of signals for this payment evaluation. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Signals extends StripeObject {
+ /** A payment evaluation signal with evaluated_at, risk_level, and score fields. */
+ @SerializedName("fraudulent_payment")
+ FraudulentPayment fraudulentPayment;
+
+ /** A payment evaluation signal with evaluated_at, risk_level, and score fields. */
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class FraudulentPayment extends StripeObject {
+ /** The time when this signal was evaluated. */
+ @SerializedName("evaluated_at")
+ Long evaluatedAt;
+
+ /**
+ * Risk level of this signal, based on the score.
+ *
+ *
One of {@code elevated}, {@code highest}, or {@code normal}.
+ */
+ @SerializedName("risk_level")
+ String riskLevel;
+
+ /**
+ * Score for this insight. Possible values for evaluated payments are -1 and any value between
+ * 0 and 100. The value is returned with two decimal places. A score of -1 indicates a test
+ * integration and higher scores indicate a higher likelihood of the signal being true.
+ */
+ @SerializedName("score")
+ BigDecimal score;
+ }
+ }
+
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(clientDeviceMetadataDetails, responseGetter);
trySetResponseGetter(customerDetails, responseGetter);
- trySetResponseGetter(insights, responseGetter);
trySetResponseGetter(outcome, responseGetter);
trySetResponseGetter(paymentDetails, responseGetter);
+ trySetResponseGetter(signals, responseGetter);
}
}
diff --git a/src/main/java/com/stripe/model/radar/ValueList.java b/src/main/java/com/stripe/model/radar/ValueList.java
index cc1ad900b1c..0e560494d20 100644
--- a/src/main/java/com/stripe/model/radar/ValueList.java
+++ b/src/main/java/com/stripe/model/radar/ValueList.java
@@ -53,8 +53,9 @@ public class ValueList extends ApiResource implements HasId, MetadataStoresmallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_total")
Long amountTotal;
@@ -68,8 +68,8 @@ public class Calculation extends ApiResource implements HasId {
CalculationLineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -411,7 +411,7 @@ public static class Address extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class ShippingCost extends StripeObject {
/**
- * The shipping amount in the smallest
+ * The shipping amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -420,7 +420,7 @@ public static class ShippingCost extends StripeObject {
/**
* The amount of tax calculated for shipping, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -460,8 +460,8 @@ public static class ShippingCost extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest currency unit.
+ * The amount of tax, in the smallest
+ * currency unit.
*/
@SerializedName("amount")
Long amount;
@@ -500,7 +500,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
@@ -586,7 +586,7 @@ public static class TaxRateDetails extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest
+ * The amount of tax, in the smallest
* currency unit.
*/
@SerializedName("amount")
@@ -614,7 +614,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java
index fc64b94fa46..4053a98e231 100644
--- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java
+++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java
@@ -15,7 +15,7 @@
@EqualsAndHashCode(callSuper = false)
public class CalculationLineItem extends StripeObject implements HasId {
/**
- * The line item amount in the smallest
+ * The line item amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -24,7 +24,7 @@ public class CalculationLineItem extends StripeObject implements HasId {
/**
* The amount of tax calculated for this line item, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -35,8 +35,8 @@ public class CalculationLineItem extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -100,7 +100,7 @@ public class CalculationLineItem extends StripeObject implements HasId {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest
+ * The amount of tax, in the smallest
* currency unit.
*/
@SerializedName("amount")
@@ -140,7 +140,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java
index f7056acdd51..74469d3db35 100644
--- a/src/main/java/com/stripe/model/tax/Registration.java
+++ b/src/main/java/com/stripe/model/tax/Registration.java
@@ -68,8 +68,8 @@ public class Registration extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java
index 49b8a683e4d..fdca9592eaf 100644
--- a/src/main/java/com/stripe/model/tax/Settings.java
+++ b/src/main/java/com/stripe/model/tax/Settings.java
@@ -36,8 +36,8 @@ public class Settings extends ApiResource {
HeadOffice headOffice;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java
index b36a3d110f7..3dc225c7943 100644
--- a/src/main/java/com/stripe/model/tax/Transaction.java
+++ b/src/main/java/com/stripe/model/tax/Transaction.java
@@ -62,8 +62,8 @@ public class Transaction extends ApiResource implements HasId {
TransactionLineItemCollection lineItems;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
@@ -469,7 +469,7 @@ public static class Address extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class ShippingCost extends StripeObject {
/**
- * The shipping amount in the smallest
+ * The shipping amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -478,7 +478,7 @@ public static class ShippingCost extends StripeObject {
/**
* The amount of tax calculated for shipping, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -521,8 +521,8 @@ public static class ShippingCost extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class TaxBreakdown extends StripeObject {
/**
- * The amount of tax, in the smallest currency unit.
+ * The amount of tax, in the smallest
+ * currency unit.
*/
@SerializedName("amount")
Long amount;
@@ -561,7 +561,7 @@ public static class TaxBreakdown extends StripeObject {
/**
* The amount on which tax is calculated, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("taxable_amount")
Long taxableAmount;
diff --git a/src/main/java/com/stripe/model/tax/TransactionLineItem.java b/src/main/java/com/stripe/model/tax/TransactionLineItem.java
index a6fb325ff88..8f1bd4781bf 100644
--- a/src/main/java/com/stripe/model/tax/TransactionLineItem.java
+++ b/src/main/java/com/stripe/model/tax/TransactionLineItem.java
@@ -14,7 +14,7 @@
@EqualsAndHashCode(callSuper = false)
public class TransactionLineItem extends StripeObject implements HasId {
/**
- * The line item amount in the smallest
+ * The line item amount in the smallest
* currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes.
* Otherwise, taxes were calculated on top of this amount.
*/
@@ -23,7 +23,7 @@ public class TransactionLineItem extends StripeObject implements HasId {
/**
* The amount of tax calculated for this line item, in the smallest currency unit.
+ * href="https://docs.stripe.com/currencies#minor-units">smallest currency unit.
*/
@SerializedName("amount_tax")
Long amountTax;
@@ -34,8 +34,8 @@ public class TransactionLineItem extends StripeObject implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java
index 44bbb5b6a5e..a8343e6c033 100644
--- a/src/main/java/com/stripe/model/terminal/Configuration.java
+++ b/src/main/java/com/stripe/model/terminal/Configuration.java
@@ -56,8 +56,8 @@ public class Configuration extends ApiResource implements HasId {
Boolean isAccountDefault;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java
index d8e2ec39dd6..79964b5d293 100644
--- a/src/main/java/com/stripe/model/terminal/Location.java
+++ b/src/main/java/com/stripe/model/terminal/Location.java
@@ -66,8 +66,8 @@ public class Location extends ApiResource implements HasId, MetadataStore
Long lastSeenAt;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/testhelpers/TestClock.java b/src/main/java/com/stripe/model/testhelpers/TestClock.java
index e4648007508..278be69db50 100644
--- a/src/main/java/com/stripe/model/testhelpers/TestClock.java
+++ b/src/main/java/com/stripe/model/testhelpers/TestClock.java
@@ -53,8 +53,8 @@ public class TestClock extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/CreditReversal.java b/src/main/java/com/stripe/model/treasury/CreditReversal.java
index 2ce933d3fc0..b39e71e1b68 100644
--- a/src/main/java/com/stripe/model/treasury/CreditReversal.java
+++ b/src/main/java/com/stripe/model/treasury/CreditReversal.java
@@ -62,8 +62,8 @@ public class CreditReversal extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/DebitReversal.java b/src/main/java/com/stripe/model/treasury/DebitReversal.java
index f8792d561d6..fc15606863c 100644
--- a/src/main/java/com/stripe/model/treasury/DebitReversal.java
+++ b/src/main/java/com/stripe/model/treasury/DebitReversal.java
@@ -66,8 +66,8 @@ public class DebitReversal extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java
index b807084b69b..20d5333a8cc 100644
--- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java
+++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java
@@ -75,8 +75,8 @@ public class FinancialAccount extends ApiResource
Boolean isDefault;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/InboundTransfer.java b/src/main/java/com/stripe/model/treasury/InboundTransfer.java
index 12823ff7cf0..716e1fc50f3 100644
--- a/src/main/java/com/stripe/model/treasury/InboundTransfer.java
+++ b/src/main/java/com/stripe/model/treasury/InboundTransfer.java
@@ -88,8 +88,8 @@ public class InboundTransfer extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/OutboundPayment.java b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
index f70ee34eda2..d8ec5fb816c 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundPayment.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundPayment.java
@@ -114,8 +114,8 @@ public class OutboundPayment extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
index 5f6ba73877b..527f0d936c2 100644
--- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
+++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java
@@ -99,8 +99,8 @@ public class OutboundTransfer extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
index d7b6134a579..650e4e5b5cf 100644
--- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
+++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java
@@ -84,8 +84,8 @@ public class ReceivedCredit extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
index 6e7c5fb5b4f..aa5e6d61cc7 100644
--- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
+++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java
@@ -83,8 +83,8 @@ public class ReceivedDebit extends ApiResource implements HasId {
LinkedFlows linkedFlows;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/Transaction.java b/src/main/java/com/stripe/model/treasury/Transaction.java
index 155204693f2..6d113d57931 100644
--- a/src/main/java/com/stripe/model/treasury/Transaction.java
+++ b/src/main/java/com/stripe/model/treasury/Transaction.java
@@ -85,8 +85,8 @@ public class Transaction extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/treasury/TransactionEntry.java b/src/main/java/com/stripe/model/treasury/TransactionEntry.java
index aa06ab900fc..64a439da80b 100644
--- a/src/main/java/com/stripe/model/treasury/TransactionEntry.java
+++ b/src/main/java/com/stripe/model/treasury/TransactionEntry.java
@@ -75,8 +75,8 @@ public class TransactionEntry extends ApiResource implements HasId {
String id;
/**
- * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
- * object exists in test mode.
+ * 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;
diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java
index 199ef950979..269497a1f2d 100644
--- a/src/main/java/com/stripe/model/v2/core/Account.java
+++ b/src/main/java/com/stripe/model/v2/core/Account.java
@@ -4,6 +4,7 @@
import com.google.gson.annotations.SerializedName;
import com.stripe.model.HasId;
import com.stripe.model.StripeObject;
+import com.stripe.v2.Amount;
import java.time.Instant;
import java.util.List;
import java.util.Map;
@@ -4250,27 +4251,6 @@ public static class AnnualRevenue extends StripeObject {
*/
@SerializedName("fiscal_year_end")
String fiscalYearEnd;
-
- /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Amount extends StripeObject {
- /**
- * Three-letter ISO currency
- * code, in lowercase. Must be a supported currency.
- */
- @SerializedName("currency")
- String currency;
-
- /**
- * A non-negative integer representing how much to charge in the smallest currency unit.
- */
- @SerializedName("value")
- Long value;
- }
}
/** Documents that may be submitted to satisfy various informational requests. */
@@ -4649,30 +4629,6 @@ public static class MonthlyEstimatedRevenue extends StripeObject {
*/
@SerializedName("amount")
Amount amount;
-
- /**
- * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23
- * USD).
- */
- @Getter
- @Setter
- @EqualsAndHashCode(callSuper = false)
- public static class Amount extends StripeObject {
- /**
- * Three-letter ISO currency
- * code, in lowercase. Must be a supported currency.
- */
- @SerializedName("currency")
- String currency;
-
- /**
- * A non-negative integer representing how much to charge in the smallest currency unit.
- */
- @SerializedName("value")
- Long value;
- }
}
/** When the business was incorporated or registered. */
diff --git a/src/main/java/com/stripe/model/v2/core/EventDestination.java b/src/main/java/com/stripe/model/v2/core/EventDestination.java
index 0aee20d9e9b..bcad2757070 100644
--- a/src/main/java/com/stripe/model/v2/core/EventDestination.java
+++ b/src/main/java/com/stripe/model/v2/core/EventDestination.java
@@ -46,7 +46,14 @@ public class EventDestination extends StripeObject implements HasId {
@SerializedName("event_payload")
String eventPayload;
- /** Where events should be routed from. */
+ /**
+ * Specifies which accounts' events route to this destination. {@code @self}: Receive events from
+ * the account that owns the event destination. {@code @accounts}: Receive events emitted from
+ * other accounts you manage which includes your v1 and v2 accounts.
+ * {@code @organization_members}: Receive events from accounts directly linked to the
+ * organization. {@code @organization_members/@accounts}: Receive events from all accounts
+ * connected to any platform accounts in the organization.
+ */
@SerializedName("events_from")
List eventsFrom;
diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java
index fa772ebc1e9..0bf0068ddde 100644
--- a/src/main/java/com/stripe/param/AccountCreateParams.java
+++ b/src/main/java/com/stripe/param/AccountCreateParams.java
@@ -1522,6 +1522,10 @@ public static class Capabilities {
@SerializedName("twint_payments")
TwintPayments twintPayments;
+ /** The upi_payments capability. */
+ @SerializedName("upi_payments")
+ UpiPayments upiPayments;
+
/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
@@ -1594,6 +1598,7 @@ private Capabilities(
Transfers transfers,
Treasury treasury,
TwintPayments twintPayments,
+ UpiPayments upiPayments,
UsBankAccountAchPayments usBankAccountAchPayments,
UsBankTransferPayments usBankTransferPayments,
ZipPayments zipPayments) {
@@ -1656,6 +1661,7 @@ private Capabilities(
this.transfers = transfers;
this.treasury = treasury;
this.twintPayments = twintPayments;
+ this.upiPayments = upiPayments;
this.usBankAccountAchPayments = usBankAccountAchPayments;
this.usBankTransferPayments = usBankTransferPayments;
this.zipPayments = zipPayments;
@@ -1784,6 +1790,8 @@ public static class Builder {
private TwintPayments twintPayments;
+ private UpiPayments upiPayments;
+
private UsBankAccountAchPayments usBankAccountAchPayments;
private UsBankTransferPayments usBankTransferPayments;
@@ -1852,6 +1860,7 @@ public AccountCreateParams.Capabilities build() {
this.transfers,
this.treasury,
this.twintPayments,
+ this.upiPayments,
this.usBankAccountAchPayments,
this.usBankTransferPayments,
this.zipPayments);
@@ -2277,6 +2286,12 @@ public Builder setTwintPayments(
return this;
}
+ /** The upi_payments capability. */
+ public Builder setUpiPayments(AccountCreateParams.Capabilities.UpiPayments upiPayments) {
+ this.upiPayments = upiPayments;
+ return this;
+ }
+
/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
AccountCreateParams.Capabilities.UsBankAccountAchPayments usBankAccountAchPayments) {
@@ -6932,6 +6947,85 @@ public Builder setRequested(Boolean requested) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiPayments {
+ /**
+ * 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;
+
+ /**
+ * 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
+ * capability are returned in the {@code requirements} arrays.
+ */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private UpiPayments(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.UpiPayments build() {
+ return new AccountCreateParams.Capabilities.UpiPayments(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.UpiPayments#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.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ 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
+ * capability are returned in the {@code requirements} arrays.
+ */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccountAchPayments {
diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java
index f193b6d6e16..74f5ae9e5af 100644
--- a/src/main/java/com/stripe/param/AccountUpdateParams.java
+++ b/src/main/java/com/stripe/param/AccountUpdateParams.java
@@ -1623,6 +1623,10 @@ public static class Capabilities {
@SerializedName("twint_payments")
TwintPayments twintPayments;
+ /** The upi_payments capability. */
+ @SerializedName("upi_payments")
+ UpiPayments upiPayments;
+
/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
@@ -1695,6 +1699,7 @@ private Capabilities(
Transfers transfers,
Treasury treasury,
TwintPayments twintPayments,
+ UpiPayments upiPayments,
UsBankAccountAchPayments usBankAccountAchPayments,
UsBankTransferPayments usBankTransferPayments,
ZipPayments zipPayments) {
@@ -1757,6 +1762,7 @@ private Capabilities(
this.transfers = transfers;
this.treasury = treasury;
this.twintPayments = twintPayments;
+ this.upiPayments = upiPayments;
this.usBankAccountAchPayments = usBankAccountAchPayments;
this.usBankTransferPayments = usBankTransferPayments;
this.zipPayments = zipPayments;
@@ -1885,6 +1891,8 @@ public static class Builder {
private TwintPayments twintPayments;
+ private UpiPayments upiPayments;
+
private UsBankAccountAchPayments usBankAccountAchPayments;
private UsBankTransferPayments usBankTransferPayments;
@@ -1953,6 +1961,7 @@ public AccountUpdateParams.Capabilities build() {
this.transfers,
this.treasury,
this.twintPayments,
+ this.upiPayments,
this.usBankAccountAchPayments,
this.usBankTransferPayments,
this.zipPayments);
@@ -2378,6 +2387,12 @@ public Builder setTwintPayments(
return this;
}
+ /** The upi_payments capability. */
+ public Builder setUpiPayments(AccountUpdateParams.Capabilities.UpiPayments upiPayments) {
+ this.upiPayments = upiPayments;
+ return this;
+ }
+
/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
AccountUpdateParams.Capabilities.UsBankAccountAchPayments usBankAccountAchPayments) {
@@ -7033,6 +7048,85 @@ public Builder setRequested(Boolean requested) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class UpiPayments {
+ /**
+ * 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;
+
+ /**
+ * 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
+ * capability are returned in the {@code requirements} arrays.
+ */
+ @SerializedName("requested")
+ Boolean requested;
+
+ private UpiPayments(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.UpiPayments build() {
+ return new AccountUpdateParams.Capabilities.UpiPayments(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.UpiPayments#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.UpiPayments#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ 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
+ * capability are returned in the {@code requirements} arrays.
+ */
+ public Builder setRequested(Boolean requested) {
+ this.requested = requested;
+ return this;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccountAchPayments {
diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
index ccdc86b5f71..40d7ffa7a3b 100644
--- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
+++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java
@@ -590,6 +590,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -665,6 +672,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -721,6 +729,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -837,6 +846,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -899,6 +910,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1441,6 +1453,15 @@ public Builder setType(ConfirmationTokenCreateParams.PaymentMethodData.Type type
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(ConfirmationTokenCreateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -5498,6 +5519,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ConfirmationTokenCreateParams.PaymentMethodData.Upi build() {
+ return new ConfirmationTokenCreateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * ConfirmationTokenCreateParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -5941,6 +6185,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java
index 4af8c7201f0..cedeeb465b2 100644
--- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java
+++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java
@@ -452,6 +452,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -499,6 +508,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -509,6 +519,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -530,6 +541,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -549,6 +562,7 @@ public CreditNoteCreateParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -610,6 +624,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNoteCreateParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ 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 CreditNoteCreateParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
index cc81e9c9328..1d1dd8f82a6 100644
--- a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
+++ b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java
@@ -523,6 +523,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -570,6 +579,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -580,6 +590,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -601,6 +612,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -620,6 +633,7 @@ public CreditNotePreviewLinesListParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -681,6 +695,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNotePreviewLinesListParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ 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 CreditNotePreviewLinesListParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java
index 68518736636..69350171b81 100644
--- a/src/main/java/com/stripe/param/CreditNotePreviewParams.java
+++ b/src/main/java/com/stripe/param/CreditNotePreviewParams.java
@@ -452,6 +452,15 @@ public static class Line {
@SerializedName("invoice_line_item")
String invoiceLineItem;
+ /**
+ * Set of key-value pairs that you can attach
+ * to an object. This can be useful for storing additional information about the object in a
+ * structured format. Individual keys can be unset by posting an empty value to them. All keys
+ * can be unset by posting an empty value to {@code metadata}.
+ */
+ @SerializedName("metadata")
+ Map metadata;
+
/** The line item quantity to credit. */
@SerializedName("quantity")
Long quantity;
@@ -499,6 +508,7 @@ private Line(
String description,
Map extraParams,
String invoiceLineItem,
+ Map metadata,
Long quantity,
Object taxAmounts,
Object taxRates,
@@ -509,6 +519,7 @@ private Line(
this.description = description;
this.extraParams = extraParams;
this.invoiceLineItem = invoiceLineItem;
+ this.metadata = metadata;
this.quantity = quantity;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
@@ -530,6 +541,8 @@ public static class Builder {
private String invoiceLineItem;
+ private Map metadata;
+
private Long quantity;
private Object taxAmounts;
@@ -549,6 +562,7 @@ public CreditNotePreviewParams.Line build() {
this.description,
this.extraParams,
this.invoiceLineItem,
+ this.metadata,
this.quantity,
this.taxAmounts,
this.taxRates,
@@ -610,6 +624,32 @@ public Builder setInvoiceLineItem(String invoiceLineItem) {
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
+ * CreditNotePreviewParams.Line#metadata} for the field documentation.
+ */
+ public Builder putMetadata(String key, String value) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ 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 CreditNotePreviewParams.Line#metadata} for the field documentation.
+ */
+ public Builder putAllMetadata(Map map) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<>();
+ }
+ this.metadata.putAll(map);
+ return this;
+ }
+
/** The line item quantity to credit. */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
index 9402cf8bf71..1e032df4801 100644
--- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
+++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java
@@ -384,6 +384,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
index 517eae5b7fe..853df8e5ad5 100644
--- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
+++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java
@@ -384,6 +384,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
index 6a56e9e115c..af872b4e00e 100644
--- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
+++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java
@@ -279,10 +279,20 @@ public static class Line {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes
* on your own or use a third-party to calculate them. You cannot set tax amounts if any line
@@ -316,6 +326,7 @@ private Line(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -329,6 +340,7 @@ private Line(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -360,6 +372,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -378,6 +392,7 @@ public InvoiceAddLinesParams.Line build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -572,12 +587,25 @@ public Builder setPricing(InvoiceAddLinesParams.Line.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
index fea9bd6b50e..eda26010906 100644
--- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
+++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java
@@ -2052,10 +2052,21 @@ public static class InvoiceItem {
@SerializedName("price_data")
PriceData priceData;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* Only required if a default
@@ -2107,6 +2118,7 @@ private InvoiceItem(
String price,
PriceData priceData,
Long quantity,
+ BigDecimal quantityDecimal,
TaxBehavior taxBehavior,
Object taxCode,
Object taxRates,
@@ -2124,6 +2136,7 @@ private InvoiceItem(
this.price = price;
this.priceData = priceData;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
this.taxRates = taxRates;
@@ -2160,6 +2173,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private TaxBehavior taxBehavior;
private Object taxCode;
@@ -2185,6 +2200,7 @@ public InvoiceCreatePreviewParams.InvoiceItem build() {
this.price,
this.priceData,
this.quantity,
+ this.quantityDecimal,
this.taxBehavior,
this.taxCode,
this.taxRates,
@@ -2380,12 +2396,25 @@ public Builder setPriceData(InvoiceCreatePreviewParams.InvoiceItem.PriceData pri
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Only required if a default
diff --git a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
index fa63985c47e..0854b6552a5 100644
--- a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java
@@ -114,10 +114,21 @@ public class InvoiceItemCreateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is
* added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions
@@ -174,6 +185,7 @@ private InvoiceItemCreateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
String subscription,
TaxBehavior taxBehavior,
Object taxCode,
@@ -194,6 +206,7 @@ private InvoiceItemCreateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.subscription = subscription;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
@@ -236,6 +249,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private String subscription;
private TaxBehavior taxBehavior;
@@ -264,6 +279,7 @@ public InvoiceItemCreateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.subscription,
this.taxBehavior,
this.taxCode,
@@ -510,12 +526,25 @@ public Builder setPricing(InvoiceItemCreateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is
* added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions
diff --git a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
index 6ec7f103dd1..9983850bc28 100644
--- a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
@@ -89,10 +89,20 @@ public class InvoiceItemUpdateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ Object quantityDecimal;
+
/**
* Only required if a default
@@ -137,6 +147,7 @@ private InvoiceItemUpdateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ Object quantityDecimal,
TaxBehavior taxBehavior,
Object taxCode,
Object taxRates,
@@ -152,6 +163,7 @@ private InvoiceItemUpdateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxBehavior = taxBehavior;
this.taxCode = taxCode;
this.taxRates = taxRates;
@@ -185,6 +197,8 @@ public static class Builder {
private Long quantity;
+ private Object quantityDecimal;
+
private TaxBehavior taxBehavior;
private Object taxCode;
@@ -207,6 +221,7 @@ public InvoiceItemUpdateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxBehavior,
this.taxCode,
this.taxRates,
@@ -428,12 +443,32 @@ public Builder setPricing(InvoiceItemUpdateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the invoice item. */
+ /**
+ * Non-negative integer. The quantity of units for the invoice item. Use {@code
+ * quantity_decimal} instead to provide decimal precision. This field will be deprecated in
+ * favor of {@code quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(EmptyParam quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Only required if a default
diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
index a5536459b48..a4b277944b0 100644
--- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
+++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java
@@ -62,11 +62,10 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams {
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys can
* be unset by posting an empty value to {@code metadata}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this value,
- * in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the incoming
+ * metadata specified on the request is directly used to set this value, in contrast to type=invoiceitem line items, where any
+ * existing metadata on the invoice line is merged with the incoming data.
*/
@SerializedName("metadata")
Object metadata;
@@ -93,10 +92,20 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ Object quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on
* your own or use a third-party to calculate them. You cannot set tax amounts if any line item
@@ -130,6 +139,7 @@ private InvoiceLineItemUpdateParams(
PriceData priceData,
Pricing pricing,
Long quantity,
+ Object quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -143,6 +153,7 @@ private InvoiceLineItemUpdateParams(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -174,6 +185,8 @@ public static class Builder {
private Long quantity;
+ private Object quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -192,6 +205,7 @@ public InvoiceLineItemUpdateParams build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -365,11 +379,10 @@ public Builder putAllMetadata(Map map) {
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this
- * value, in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the
+ * incoming metadata specified on the request is directly used to set this value, in contrast to
+ * type=invoiceitem line items, where
+ * any existing metadata on the invoice line is merged with the incoming data.
*/
public Builder setMetadata(EmptyParam metadata) {
this.metadata = metadata;
@@ -381,11 +394,10 @@ public Builder setMetadata(EmptyParam metadata) {
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}. For type=subscription
- * line items, the incoming metadata specified on the request is directly used to set this
- * value, in contrast to type=invoiceitem line items,
- * where any existing metadata on the invoice line is merged with the incoming data.
+ * href="https://stripe.com/api/invoices/line_item">type=subscription line items, the
+ * incoming metadata specified on the request is directly used to set this value, in contrast to
+ * type=invoiceitem line items, where
+ * any existing metadata on the invoice line is merged with the incoming data.
*/
public Builder setMetadata(Map metadata) {
this.metadata = metadata;
@@ -420,12 +432,32 @@ public Builder setPricing(InvoiceLineItemUpdateParams.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ public Builder setQuantityDecimal(EmptyParam quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
index 2cfd34330de..7937d6dc2b3 100644
--- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
+++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java
@@ -296,10 +296,20 @@ public static class Line {
@SerializedName("pricing")
Pricing pricing;
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
@SerializedName("quantity")
Long quantity;
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
+ */
+ @SerializedName("quantity_decimal")
+ BigDecimal quantityDecimal;
+
/**
* A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes
* on your own or use a third-party to calculate them. You cannot set tax amounts if any line
@@ -333,6 +343,7 @@ private Line(
PriceData priceData,
Pricing pricing,
Long quantity,
+ BigDecimal quantityDecimal,
Object taxAmounts,
Object taxRates) {
this.amount = amount;
@@ -346,6 +357,7 @@ private Line(
this.priceData = priceData;
this.pricing = pricing;
this.quantity = quantity;
+ this.quantityDecimal = quantityDecimal;
this.taxAmounts = taxAmounts;
this.taxRates = taxRates;
}
@@ -377,6 +389,8 @@ public static class Builder {
private Long quantity;
+ private BigDecimal quantityDecimal;
+
private Object taxAmounts;
private Object taxRates;
@@ -395,6 +409,7 @@ public InvoiceUpdateLinesParams.Line build() {
this.priceData,
this.pricing,
this.quantity,
+ this.quantityDecimal,
this.taxAmounts,
this.taxRates);
}
@@ -596,12 +611,25 @@ public Builder setPricing(InvoiceUpdateLinesParams.Line.Pricing pricing) {
return this;
}
- /** Non-negative integer. The quantity of units for the line item. */
+ /**
+ * Non-negative integer. The quantity of units for the line item. Use {@code quantity_decimal}
+ * instead to provide decimal precision. This field will be deprecated in favor of {@code
+ * quantity_decimal} in a future version.
+ */
public Builder setQuantity(Long quantity) {
this.quantity = quantity;
return this;
}
+ /**
+ * Non-negative decimal with at most 12 decimal places. The quantity of units for the line
+ * item.
+ */
+ public Builder setQuantityDecimal(BigDecimal quantityDecimal) {
+ this.quantityDecimal = quantityDecimal;
+ return this;
+ }
+
/**
* Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index 380152b2943..d1b7defa9bf 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -3163,6 +3163,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -3238,6 +3245,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -3294,6 +3302,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -3410,6 +3419,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -3472,6 +3483,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -4011,6 +4023,15 @@ public Builder setType(PaymentIntentConfirmParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentIntentConfirmParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -8055,6 +8076,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodData.Upi build() {
+ return new PaymentIntentConfirmParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentConfirmParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -8496,6 +8740,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -8866,6 +9113,13 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Object twint;
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Object upi;
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
@@ -8938,6 +9192,7 @@ private PaymentMethodOptions(
Object sofort,
Object swish,
Object twint,
+ Object upi,
Object usBankAccount,
Object wechatPay,
Object zip) {
@@ -8991,6 +9246,7 @@ private PaymentMethodOptions(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -9101,6 +9357,8 @@ public static class Builder {
private Object twint;
+ private Object upi;
+
private Object usBankAccount;
private Object wechatPay;
@@ -9160,6 +9418,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -10088,6 +10347,24 @@ public Builder setTwint(EmptyParam twint) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(PaymentIntentConfirmParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(EmptyParam upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
@@ -10195,7 +10472,7 @@ public static class AcssDebit {
@SerializedName("target_date")
String targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10343,7 +10620,7 @@ public Builder setTargetDate(String targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -13518,7 +13795,10 @@ public enum Type implements ApiRequestParams.EnumParam {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -13653,7 +13933,10 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions build
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -22182,6 +22465,267 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodOptions.Upi build() {
+ return new PaymentIntentConfirmParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -22206,10 +22750,6 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Preferred transaction settlement speed. */
- @SerializedName("preferred_settlement_speed")
- ApiRequestParams.EnumParam preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -22248,7 +22788,7 @@ public static class UsBankAccount {
@SerializedName("transaction_purpose")
ApiRequestParams.EnumParam transactionPurpose;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -22257,7 +22797,6 @@ private UsBankAccount(
FinancialConnections financialConnections,
MandateOptions mandateOptions,
Networks networks,
- ApiRequestParams.EnumParam preferredSettlementSpeed,
ApiRequestParams.EnumParam setupFutureUsage,
String targetDate,
ApiRequestParams.EnumParam transactionPurpose,
@@ -22266,7 +22805,6 @@ private UsBankAccount(
this.financialConnections = financialConnections;
this.mandateOptions = mandateOptions;
this.networks = networks;
- this.preferredSettlementSpeed = preferredSettlementSpeed;
this.setupFutureUsage = setupFutureUsage;
this.targetDate = targetDate;
this.transactionPurpose = transactionPurpose;
@@ -22286,8 +22824,6 @@ public static class Builder {
private Networks networks;
- private ApiRequestParams.EnumParam preferredSettlementSpeed;
-
private ApiRequestParams.EnumParam setupFutureUsage;
private String targetDate;
@@ -22303,7 +22839,6 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() {
this.financialConnections,
this.mandateOptions,
this.networks,
- this.preferredSettlementSpeed,
this.setupFutureUsage,
this.targetDate,
this.transactionPurpose,
@@ -22363,20 +22898,6 @@ public Builder setNetworks(
return this;
}
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(
- PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed
- preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -22461,7 +22982,7 @@ public Builder setTransactionPurpose(EmptyParam transactionPurpose) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -23083,21 +23604,6 @@ public enum Requested implements ApiRequestParams.EnumParam {
}
}
- public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam {
- @SerializedName("fastest")
- FASTEST("fastest"),
-
- @SerializedName("standard")
- STANDARD("standard");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- PreferredSettlementSpeed(String value) {
- this.value = value;
- }
- }
-
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@@ -24003,6 +24509,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
index 97ad5db0d0c..52236d32165 100644
--- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java
@@ -3696,6 +3696,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -3771,6 +3778,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -3827,6 +3835,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -3943,6 +3952,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -4005,6 +4016,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -4537,6 +4549,15 @@ public Builder setType(PaymentIntentCreateParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentIntentCreateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -8575,6 +8596,229 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodData.Upi build() {
+ return new PaymentIntentCreateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentCreateParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -9016,6 +9260,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -9386,6 +9633,13 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Object twint;
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Object upi;
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
@@ -9458,6 +9712,7 @@ private PaymentMethodOptions(
Object sofort,
Object swish,
Object twint,
+ Object upi,
Object usBankAccount,
Object wechatPay,
Object zip) {
@@ -9511,6 +9766,7 @@ private PaymentMethodOptions(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -9621,6 +9877,8 @@ public static class Builder {
private Object twint;
+ private Object upi;
+
private Object usBankAccount;
private Object wechatPay;
@@ -9680,6 +9938,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -10605,6 +10864,24 @@ public Builder setTwint(EmptyParam twint) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(PaymentIntentCreateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(EmptyParam upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
@@ -10712,7 +10989,7 @@ public static class AcssDebit {
@SerializedName("target_date")
String targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10860,7 +11137,7 @@ public Builder setTargetDate(String targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -14033,7 +14310,10 @@ public enum Type implements ApiRequestParams.EnumParam {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -14168,7 +14448,10 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build(
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -22684,6 +22967,267 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodOptions.Upi build() {
+ return new PaymentIntentCreateParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ PaymentIntentCreateParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new PaymentIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -22708,10 +23252,6 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Preferred transaction settlement speed. */
- @SerializedName("preferred_settlement_speed")
- ApiRequestParams.EnumParam preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -22750,7 +23290,7 @@ public static class UsBankAccount {
@SerializedName("transaction_purpose")
ApiRequestParams.EnumParam transactionPurpose;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -22759,7 +23299,6 @@ private UsBankAccount(
FinancialConnections financialConnections,
MandateOptions mandateOptions,
Networks networks,
- ApiRequestParams.EnumParam preferredSettlementSpeed,
ApiRequestParams.EnumParam setupFutureUsage,
String targetDate,
ApiRequestParams.EnumParam transactionPurpose,
@@ -22768,7 +23307,6 @@ private UsBankAccount(
this.financialConnections = financialConnections;
this.mandateOptions = mandateOptions;
this.networks = networks;
- this.preferredSettlementSpeed = preferredSettlementSpeed;
this.setupFutureUsage = setupFutureUsage;
this.targetDate = targetDate;
this.transactionPurpose = transactionPurpose;
@@ -22788,8 +23326,6 @@ public static class Builder {
private Networks networks;
- private ApiRequestParams.EnumParam preferredSettlementSpeed;
-
private ApiRequestParams.EnumParam setupFutureUsage;
private String targetDate;
@@ -22805,7 +23341,6 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() {
this.financialConnections,
this.mandateOptions,
this.networks,
- this.preferredSettlementSpeed,
this.setupFutureUsage,
this.targetDate,
this.transactionPurpose,
@@ -22863,20 +23398,6 @@ public Builder setNetworks(
return this;
}
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(
- PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed
- preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -22961,7 +23482,7 @@ public Builder setTransactionPurpose(EmptyParam transactionPurpose) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -23583,21 +24104,6 @@ public enum Requested implements ApiRequestParams.EnumParam {
}
}
- public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam {
- @SerializedName("fastest")
- FASTEST("fastest"),
-
- @SerializedName("standard")
- STANDARD("standard");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- PreferredSettlementSpeed(String value) {
- this.value = value;
- }
- }
-
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@@ -24626,6 +25132,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
index 36189aa82ed..554a8d43d30 100644
--- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
@@ -3173,6 +3173,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -3248,6 +3255,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -3304,6 +3312,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -3420,6 +3429,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -3482,6 +3493,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -4014,6 +4026,15 @@ public Builder setType(PaymentIntentUpdateParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentIntentUpdateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -8226,6 +8247,238 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodData.Upi build() {
+ return new PaymentIntentUpdateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentUpdateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ Object description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ Object description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private Object description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new PaymentIntentUpdateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentUpdateParams.PaymentMethodData.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(EmptyParam description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentUpdateParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -8685,6 +8938,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -9055,6 +9311,13 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Object twint;
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Object upi;
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
@@ -9127,6 +9390,7 @@ private PaymentMethodOptions(
Object sofort,
Object swish,
Object twint,
+ Object upi,
Object usBankAccount,
Object wechatPay,
Object zip) {
@@ -9180,6 +9444,7 @@ private PaymentMethodOptions(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -9290,6 +9555,8 @@ public static class Builder {
private Object twint;
+ private Object upi;
+
private Object usBankAccount;
private Object wechatPay;
@@ -9349,6 +9616,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -10274,6 +10542,24 @@ public Builder setTwint(EmptyParam twint) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(PaymentIntentUpdateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
+ /**
+ * If this is a {@code upi} PaymentIntent, this sub-hash contains details about the UPI
+ * payment method options.
+ */
+ public Builder setUpi(EmptyParam upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
@@ -10381,7 +10667,7 @@ public static class AcssDebit {
@SerializedName("target_date")
Object targetDate;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10539,7 +10825,7 @@ public Builder setTargetDate(EmptyParam targetDate) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -13778,7 +14064,10 @@ public enum Type implements ApiRequestParams.EnumParam {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -13913,7 +14202,10 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions build(
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -22561,6 +22853,276 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodOptions.Upi build() {
+ return new PaymentIntentUpdateParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ PaymentIntentUpdateParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ Object description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ Object description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private Object description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new PaymentIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(EmptyParam description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * PaymentIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -22585,10 +23147,6 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Preferred transaction settlement speed. */
- @SerializedName("preferred_settlement_speed")
- ApiRequestParams.EnumParam preferredSettlementSpeed;
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
@@ -22627,7 +23185,7 @@ public static class UsBankAccount {
@SerializedName("transaction_purpose")
ApiRequestParams.EnumParam transactionPurpose;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -22636,7 +23194,6 @@ private UsBankAccount(
FinancialConnections financialConnections,
MandateOptions mandateOptions,
Networks networks,
- ApiRequestParams.EnumParam preferredSettlementSpeed,
ApiRequestParams.EnumParam setupFutureUsage,
Object targetDate,
ApiRequestParams.EnumParam transactionPurpose,
@@ -22645,7 +23202,6 @@ private UsBankAccount(
this.financialConnections = financialConnections;
this.mandateOptions = mandateOptions;
this.networks = networks;
- this.preferredSettlementSpeed = preferredSettlementSpeed;
this.setupFutureUsage = setupFutureUsage;
this.targetDate = targetDate;
this.transactionPurpose = transactionPurpose;
@@ -22665,8 +23221,6 @@ public static class Builder {
private Networks networks;
- private ApiRequestParams.EnumParam preferredSettlementSpeed;
-
private ApiRequestParams.EnumParam setupFutureUsage;
private Object targetDate;
@@ -22682,7 +23236,6 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() {
this.financialConnections,
this.mandateOptions,
this.networks,
- this.preferredSettlementSpeed,
this.setupFutureUsage,
this.targetDate,
this.transactionPurpose,
@@ -22740,20 +23293,6 @@ public Builder setNetworks(
return this;
}
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(
- PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.PreferredSettlementSpeed
- preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
- /** Preferred transaction settlement speed. */
- public Builder setPreferredSettlementSpeed(EmptyParam preferredSettlementSpeed) {
- this.preferredSettlementSpeed = preferredSettlementSpeed;
- return this;
- }
-
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
@@ -22848,7 +23387,7 @@ public Builder setTransactionPurpose(EmptyParam transactionPurpose) {
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -23479,21 +24018,6 @@ public enum Requested implements ApiRequestParams.EnumParam {
}
}
- public enum PreferredSettlementSpeed implements ApiRequestParams.EnumParam {
- @SerializedName("fastest")
- FASTEST("fastest"),
-
- @SerializedName("standard")
- STANDARD("standard");
-
- @Getter(onMethod_ = {@Override})
- private final String value;
-
- PreferredSettlementSpeed(String value) {
- this.value = value;
- }
- }
-
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@@ -24465,6 +24989,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
index 031e01a8480..53da9a4cff8 100644
--- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java
@@ -7095,6 +7095,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
index 43bb3383dec..efe8f622b7d 100644
--- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
@@ -6157,6 +6157,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java
index a4cae983f99..06285487626 100644
--- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java
@@ -487,6 +487,13 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams {
@SerializedName("twint")
Twint twint;
+ /**
+ * Unified Payment Interface (UPI) is India's leading payment method with exponential growth since
+ * it launched in 2016.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* Stripe users in the United States can accept ACH direct debit payments from customers with a US
* bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check
@@ -571,6 +578,7 @@ private PaymentMethodConfigurationCreateParams(
Sofort sofort,
Swish swish,
Twint twint,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -631,6 +639,7 @@ private PaymentMethodConfigurationCreateParams(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -755,6 +764,8 @@ public static class Builder {
private Twint twint;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -821,6 +832,7 @@ public PaymentMethodConfigurationCreateParams build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1459,6 +1471,15 @@ public Builder setTwint(PaymentMethodConfigurationCreateParams.Twint twint) {
return this;
}
+ /**
+ * Unified Payment Interface (UPI) is India's leading payment method with exponential growth
+ * since it launched in 2016.
+ */
+ public Builder setUpi(PaymentMethodConfigurationCreateParams.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* Stripe users in the United States can accept ACH direct debit payments from customers with a
* US bank account using the Automated Clearing House (ACH) payments system operated by Nacha.
@@ -10271,6 +10292,169 @@ public enum Preference implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /** Whether or not the payment method should be displayed. */
+ @SerializedName("display_preference")
+ DisplayPreference displayPreference;
+
+ /**
+ * 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 Upi(DisplayPreference displayPreference, Map extraParams) {
+ this.displayPreference = displayPreference;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private DisplayPreference displayPreference;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodConfigurationCreateParams.Upi build() {
+ return new PaymentMethodConfigurationCreateParams.Upi(
+ this.displayPreference, this.extraParams);
+ }
+
+ /** Whether or not the payment method should be displayed. */
+ public Builder setDisplayPreference(
+ PaymentMethodConfigurationCreateParams.Upi.DisplayPreference displayPreference) {
+ this.displayPreference = displayPreference;
+ 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
+ * PaymentMethodConfigurationCreateParams.Upi#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 PaymentMethodConfigurationCreateParams.Upi#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 DisplayPreference {
+ /**
+ * 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;
+
+ /** The account's preference for whether or not to display this payment method. */
+ @SerializedName("preference")
+ Preference preference;
+
+ private DisplayPreference(Map extraParams, Preference preference) {
+ this.extraParams = extraParams;
+ this.preference = preference;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Preference preference;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodConfigurationCreateParams.Upi.DisplayPreference build() {
+ return new PaymentMethodConfigurationCreateParams.Upi.DisplayPreference(
+ this.extraParams, this.preference);
+ }
+
+ /**
+ * 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 PaymentMethodConfigurationCreateParams.Upi.DisplayPreference#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 PaymentMethodConfigurationCreateParams.Upi.DisplayPreference#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** The account's preference for whether or not to display this payment method. */
+ public Builder setPreference(
+ PaymentMethodConfigurationCreateParams.Upi.DisplayPreference.Preference preference) {
+ this.preference = preference;
+ return this;
+ }
+ }
+
+ public enum Preference implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off")
+ OFF("off"),
+
+ @SerializedName("on")
+ ON("on");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Preference(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java
index 1261aa9fceb..e6b3024243b 100644
--- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java
@@ -488,6 +488,13 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams {
@SerializedName("twint")
Twint twint;
+ /**
+ * Unified Payment Interface (UPI) is India's leading payment method with exponential growth since
+ * it launched in 2016.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* Stripe users in the United States can accept ACH direct debit payments from customers with a US
* bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check
@@ -572,6 +579,7 @@ private PaymentMethodConfigurationUpdateParams(
Sofort sofort,
Swish swish,
Twint twint,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -632,6 +640,7 @@ private PaymentMethodConfigurationUpdateParams(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -756,6 +765,8 @@ public static class Builder {
private Twint twint;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -822,6 +833,7 @@ public PaymentMethodConfigurationUpdateParams build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1466,6 +1478,15 @@ public Builder setTwint(PaymentMethodConfigurationUpdateParams.Twint twint) {
return this;
}
+ /**
+ * Unified Payment Interface (UPI) is India's leading payment method with exponential growth
+ * since it launched in 2016.
+ */
+ public Builder setUpi(PaymentMethodConfigurationUpdateParams.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* Stripe users in the United States can accept ACH direct debit payments from customers with a
* US bank account using the Automated Clearing House (ACH) payments system operated by Nacha.
@@ -10278,6 +10299,169 @@ public enum Preference implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /** Whether or not the payment method should be displayed. */
+ @SerializedName("display_preference")
+ DisplayPreference displayPreference;
+
+ /**
+ * 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 Upi(DisplayPreference displayPreference, Map extraParams) {
+ this.displayPreference = displayPreference;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private DisplayPreference displayPreference;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodConfigurationUpdateParams.Upi build() {
+ return new PaymentMethodConfigurationUpdateParams.Upi(
+ this.displayPreference, this.extraParams);
+ }
+
+ /** Whether or not the payment method should be displayed. */
+ public Builder setDisplayPreference(
+ PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference displayPreference) {
+ this.displayPreference = displayPreference;
+ 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
+ * PaymentMethodConfigurationUpdateParams.Upi#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 PaymentMethodConfigurationUpdateParams.Upi#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 DisplayPreference {
+ /**
+ * 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;
+
+ /** The account's preference for whether or not to display this payment method. */
+ @SerializedName("preference")
+ Preference preference;
+
+ private DisplayPreference(Map extraParams, Preference preference) {
+ this.extraParams = extraParams;
+ this.preference = preference;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private Preference preference;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference build() {
+ return new PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference(
+ this.extraParams, this.preference);
+ }
+
+ /**
+ * 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 PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference#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 PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference#extraParams}
+ * for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** The account's preference for whether or not to display this payment method. */
+ public Builder setPreference(
+ PaymentMethodConfigurationUpdateParams.Upi.DisplayPreference.Preference preference) {
+ this.preference = preference;
+ return this;
+ }
+ }
+
+ public enum Preference implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off")
+ OFF("off"),
+
+ @SerializedName("on")
+ ON("on");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ Preference(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
index 6a80db12abd..0503208963d 100644
--- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
@@ -415,6 +415,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -495,6 +502,7 @@ private PaymentMethodCreateParams(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -556,6 +564,7 @@ private PaymentMethodCreateParams(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -682,6 +691,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -749,6 +760,7 @@ public PaymentMethodCreateParams build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1340,6 +1352,15 @@ public Builder setType(PaymentMethodCreateParams.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(PaymentMethodCreateParams.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -5651,6 +5672,221 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodCreateParams.Upi build() {
+ return new PaymentMethodCreateParams.Upi(this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ PaymentMethodCreateParams.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param refers
+ * to the exact amount to be charged in future payments. If {@code maximum}, the amount
+ * charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public PaymentMethodCreateParams.Upi.MandateOptions build() {
+ return new PaymentMethodCreateParams.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ PaymentMethodCreateParams.Upi.MandateOptions.AmountType amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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 PaymentMethodCreateParams.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -6092,6 +6328,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java
index b9ed4dcb712..82cf1b5d0ae 100644
--- a/src/main/java/com/stripe/param/PaymentMethodListParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java
@@ -412,6 +412,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
index 6758c5ef32b..37457541478 100644
--- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
@@ -1004,6 +1004,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -1079,6 +1086,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -1135,6 +1143,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -1251,6 +1260,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -1313,6 +1324,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1845,6 +1857,15 @@ public Builder setType(SetupIntentConfirmParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(SetupIntentConfirmParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -5883,6 +5904,228 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodData.Upi build() {
+ return new SetupIntentConfirmParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentConfirmParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new SetupIntentConfirmParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentConfirmParams.PaymentMethodData.Upi.MandateOptions.AmountType amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentConfirmParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -6324,6 +6567,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -6421,6 +6667,13 @@ public static class PaymentMethodOptions {
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the US
* bank account payment method options.
@@ -6440,6 +6693,7 @@ private PaymentMethodOptions(
Paypal paypal,
Payto payto,
SepaDebit sepaDebit,
+ Upi upi,
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
@@ -6452,6 +6706,7 @@ private PaymentMethodOptions(
this.paypal = paypal;
this.payto = payto;
this.sepaDebit = sepaDebit;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
}
@@ -6482,6 +6737,8 @@ public static class Builder {
private SepaDebit sepaDebit;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
/** Finalize and obtain parameter instance from this builder. */
@@ -6498,6 +6755,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() {
this.paypal,
this.payto,
this.sepaDebit,
+ this.upi,
this.usBankAccount);
}
@@ -6620,6 +6878,15 @@ public Builder setSepaDebit(
return this;
}
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ public Builder setUpi(SetupIntentConfirmParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the
* US bank account payment method options.
@@ -6655,7 +6922,7 @@ public static class AcssDebit {
@SerializedName("mandate_options")
MandateOptions mandateOptions;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -6735,7 +7002,7 @@ public Builder setMandateOptions(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -7433,7 +7700,10 @@ public Builder setThreeDSecure(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -7582,7 +7852,10 @@ public SetupIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions build()
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -9957,6 +10230,267 @@ public Builder setReferencePrefix(EmptyParam referencePrefix) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodOptions.Upi build() {
+ return new SetupIntentConfirmParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ SetupIntentConfirmParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new SetupIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentConfirmParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -9981,7 +10515,7 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10074,7 +10608,7 @@ public Builder setNetworks(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
index df0d34e227b..e500e560311 100644
--- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java
@@ -1542,6 +1542,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -1617,6 +1624,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -1673,6 +1681,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -1789,6 +1798,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -1851,6 +1862,7 @@ public SetupIntentCreateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -2382,6 +2394,15 @@ public Builder setType(SetupIntentCreateParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(SetupIntentCreateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -6419,6 +6440,228 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodData.Upi build() {
+ return new SetupIntentCreateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentCreateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new SetupIntentCreateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentCreateParams.PaymentMethodData.Upi.MandateOptions.AmountType amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentCreateParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -6860,6 +7103,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -6957,6 +7203,13 @@ public static class PaymentMethodOptions {
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the US
* bank account payment method options.
@@ -6976,6 +7229,7 @@ private PaymentMethodOptions(
Paypal paypal,
Payto payto,
SepaDebit sepaDebit,
+ Upi upi,
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
@@ -6988,6 +7242,7 @@ private PaymentMethodOptions(
this.paypal = paypal;
this.payto = payto;
this.sepaDebit = sepaDebit;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
}
@@ -7018,6 +7273,8 @@ public static class Builder {
private SepaDebit sepaDebit;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
/** Finalize and obtain parameter instance from this builder. */
@@ -7034,6 +7291,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() {
this.paypal,
this.payto,
this.sepaDebit,
+ this.upi,
this.usBankAccount);
}
@@ -7156,6 +7414,15 @@ public Builder setSepaDebit(
return this;
}
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ public Builder setUpi(SetupIntentCreateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the
* US bank account payment method options.
@@ -7191,7 +7458,7 @@ public static class AcssDebit {
@SerializedName("mandate_options")
MandateOptions mandateOptions;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -7271,7 +7538,7 @@ public Builder setMandateOptions(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -7967,7 +8234,10 @@ public Builder setThreeDSecure(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -8116,7 +8386,10 @@ public SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build()
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -10491,6 +10764,267 @@ public Builder setReferencePrefix(EmptyParam referencePrefix) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodOptions.Upi build() {
+ return new SetupIntentCreateParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ SetupIntentCreateParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ String description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ String description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private String description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new SetupIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentCreateParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -10515,7 +11049,7 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10608,7 +11142,7 @@ public Builder setNetworks(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -11496,6 +12030,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
index 60c1dd1bbb0..d6c0d53b3a2 100644
--- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java
@@ -911,6 +911,13 @@ public static class PaymentMethodData {
@SerializedName("type")
Type type;
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
@@ -986,6 +993,7 @@ private PaymentMethodData(
Swish swish,
Twint twint,
Type type,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
@@ -1042,6 +1050,7 @@ private PaymentMethodData(
this.swish = swish;
this.twint = twint;
this.type = type;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
@@ -1158,6 +1167,8 @@ public static class Builder {
private Type type;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -1220,6 +1231,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() {
this.swish,
this.twint,
this.type,
+ this.upi,
this.usBankAccount,
this.wechatPay,
this.zip);
@@ -1751,6 +1763,15 @@ public Builder setType(SetupIntentUpdateParams.PaymentMethodData.Type type) {
return this;
}
+ /**
+ * If this is a {@code upi} PaymentMethod, this hash contains details about the UPI payment
+ * method.
+ */
+ public Builder setUpi(SetupIntentUpdateParams.PaymentMethodData.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
@@ -5962,6 +5983,237 @@ public Builder putAllExtraParam(Map map) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ private Upi(Map extraParams, MandateOptions mandateOptions) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodData.Upi build() {
+ return new SetupIntentUpdateParams.PaymentMethodData.Upi(
+ this.extraParams, this.mandateOptions);
+ }
+
+ /**
+ * 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.Upi#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.Upi#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentUpdateParams.PaymentMethodData.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ Object description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ Object description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private Object description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodData.Upi.MandateOptions build() {
+ return new SetupIntentUpdateParams.PaymentMethodData.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentUpdateParams.PaymentMethodData.Upi.MandateOptions.AmountType amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(EmptyParam description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentUpdateParams.PaymentMethodData.Upi.MandateOptions#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.Upi.MandateOptions#extraParams} for the field
+ * documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -6421,6 +6673,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@@ -6518,6 +6773,13 @@ public static class PaymentMethodOptions {
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ @SerializedName("upi")
+ Upi upi;
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the US
* bank account payment method options.
@@ -6537,6 +6799,7 @@ private PaymentMethodOptions(
Paypal paypal,
Payto payto,
SepaDebit sepaDebit,
+ Upi upi,
UsBankAccount usBankAccount) {
this.acssDebit = acssDebit;
this.amazonPay = amazonPay;
@@ -6549,6 +6812,7 @@ private PaymentMethodOptions(
this.paypal = paypal;
this.payto = payto;
this.sepaDebit = sepaDebit;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
}
@@ -6579,6 +6843,8 @@ public static class Builder {
private SepaDebit sepaDebit;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
/** Finalize and obtain parameter instance from this builder. */
@@ -6595,6 +6861,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() {
this.paypal,
this.payto,
this.sepaDebit,
+ this.upi,
this.usBankAccount);
}
@@ -6717,6 +6984,15 @@ public Builder setSepaDebit(
return this;
}
+ /**
+ * If this is a {@code upi} SetupIntent, this sub-hash contains details about the UPI payment
+ * method options.
+ */
+ public Builder setUpi(SetupIntentUpdateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/**
* If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the
* US bank account payment method options.
@@ -6752,7 +7028,7 @@ public static class AcssDebit {
@SerializedName("mandate_options")
MandateOptions mandateOptions;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -6832,7 +7108,7 @@ public Builder setMandateOptions(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
@@ -7537,7 +7813,10 @@ public Builder setThreeDSecure(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
@SerializedName("amount")
Long amount;
@@ -7686,7 +7965,10 @@ public SetupIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions build()
this.supportedTypes);
}
- /** Required. Amount to be charged for future payments. */
+ /**
+ * Required. Amount to be charged for future payments, specified in the
+ * presentment currency.
+ */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
@@ -10172,6 +10454,276 @@ public Builder setReferencePrefix(EmptyParam referencePrefix) {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Upi {
+ /**
+ * 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;
+
+ /** Configuration options for setting up an eMandate. */
+ @SerializedName("mandate_options")
+ MandateOptions mandateOptions;
+
+ @SerializedName("setup_future_usage")
+ ApiRequestParams.EnumParam setupFutureUsage;
+
+ private Upi(
+ Map extraParams,
+ MandateOptions mandateOptions,
+ ApiRequestParams.EnumParam setupFutureUsage) {
+ this.extraParams = extraParams;
+ this.mandateOptions = mandateOptions;
+ this.setupFutureUsage = setupFutureUsage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Map extraParams;
+
+ private MandateOptions mandateOptions;
+
+ private ApiRequestParams.EnumParam setupFutureUsage;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodOptions.Upi build() {
+ return new SetupIntentUpdateParams.PaymentMethodOptions.Upi(
+ this.extraParams, this.mandateOptions, this.setupFutureUsage);
+ }
+
+ /**
+ * 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.PaymentMethodOptions.Upi#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.PaymentMethodOptions.Upi#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+
+ /** Configuration options for setting up an eMandate. */
+ public Builder setMandateOptions(
+ SetupIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions mandateOptions) {
+ this.mandateOptions = mandateOptions;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(
+ SetupIntentUpdateParams.PaymentMethodOptions.Upi.SetupFutureUsage setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+
+ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
+ this.setupFutureUsage = setupFutureUsage;
+ return this;
+ }
+ }
+
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class MandateOptions {
+ /** Amount to be charged for future payments. */
+ @SerializedName("amount")
+ Long amount;
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ @SerializedName("amount_type")
+ AmountType amountType;
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ @SerializedName("description")
+ Object description;
+
+ /** End date of the mandate or subscription. */
+ @SerializedName("end_date")
+ Long endDate;
+
+ /**
+ * 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 MandateOptions(
+ Long amount,
+ AmountType amountType,
+ Object description,
+ Long endDate,
+ Map extraParams) {
+ this.amount = amount;
+ this.amountType = amountType;
+ this.description = description;
+ this.endDate = endDate;
+ this.extraParams = extraParams;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private Long amount;
+
+ private AmountType amountType;
+
+ private Object description;
+
+ private Long endDate;
+
+ private Map extraParams;
+
+ /** Finalize and obtain parameter instance from this builder. */
+ public SetupIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions build() {
+ return new SetupIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions(
+ this.amount, this.amountType, this.description, this.endDate, this.extraParams);
+ }
+
+ /** Amount to be charged for future payments. */
+ public Builder setAmount(Long amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
+ * refers to the exact amount to be charged in future payments. If {@code maximum}, the
+ * amount charged can be up to the value passed for the {@code amount} param.
+ */
+ public Builder setAmountType(
+ SetupIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions.AmountType
+ amountType) {
+ this.amountType = amountType;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the mandate or subscription that is meant to be displayed to the
+ * customer.
+ */
+ public Builder setDescription(EmptyParam description) {
+ this.description = description;
+ return this;
+ }
+
+ /** End date of the mandate or subscription. */
+ public Builder setEndDate(Long endDate) {
+ this.endDate = endDate;
+ 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
+ * SetupIntentUpdateParams.PaymentMethodOptions.Upi.MandateOptions#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.PaymentMethodOptions.Upi.MandateOptions#extraParams} for the
+ * field documentation.
+ */
+ public Builder putAllExtraParam(Map map) {
+ if (this.extraParams == null) {
+ this.extraParams = new HashMap<>();
+ }
+ this.extraParams.putAll(map);
+ return this;
+ }
+ }
+
+ public enum AmountType implements ApiRequestParams.EnumParam {
+ @SerializedName("fixed")
+ FIXED("fixed"),
+
+ @SerializedName("maximum")
+ MAXIMUM("maximum");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ AmountType(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("none")
+ NONE("none"),
+
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ SetupFutureUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+
@Getter
@EqualsAndHashCode(callSuper = false)
public static class UsBankAccount {
@@ -10196,7 +10748,7 @@ public static class UsBankAccount {
@SerializedName("networks")
Networks networks;
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
@@ -10289,7 +10841,7 @@ public Builder setNetworks(
return this;
}
- /** Bank account verification method. */
+ /** Bank account verification method. The default value is {@code automatic}. */
public Builder setVerificationMethod(
SetupIntentUpdateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod
verificationMethod) {
@@ -11078,6 +11630,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("twint")
TWINT("twint"),
+ @SerializedName("upi")
+ UPI("upi"),
+
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java
index 22abddda759..03ff21eb8fd 100644
--- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java
@@ -251,8 +251,8 @@ public class SubscriptionCreateParams extends ApiRequestParams {
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
@SerializedName("pending_invoice_item_interval")
Object pendingInvoiceItemInterval;
@@ -1022,8 +1022,8 @@ public Builder setPaymentSettings(SubscriptionCreateParams.PaymentSettings payme
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
public Builder setPendingInvoiceItemInterval(
SubscriptionCreateParams.PendingInvoiceItemInterval pendingInvoiceItemInterval) {
@@ -1033,8 +1033,8 @@ public Builder setPendingInvoiceItemInterval(
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterval) {
this.pendingInvoiceItemInterval = pendingInvoiceItemInterval;
@@ -4714,7 +4714,7 @@ public Builder setRequestThreeDSecure(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -4774,7 +4774,7 @@ public static class Builder {
.MandateOptions(this.amount, this.amountType, this.description, this.extraParams);
}
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
diff --git a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java
index 4a5f7729b09..48f93d206ce 100644
--- a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java
@@ -107,7 +107,7 @@ public class SubscriptionItemCreateParams extends ApiRequestParams {
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
@SerializedName("proration_date")
Long prorationDate;
@@ -421,7 +421,7 @@ public Builder setProrationBehavior(
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
public Builder setProrationDate(Long prorationDate) {
this.prorationDate = prorationDate;
diff --git a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java
index e4dd97fd49f..b120672bf05 100644
--- a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java
@@ -71,7 +71,7 @@ public class SubscriptionItemDeleteParams extends ApiRequestParams {
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
@SerializedName("proration_date")
Long prorationDate;
@@ -199,7 +199,7 @@ public Builder setProrationBehavior(
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
public Builder setProrationDate(Long prorationDate) {
this.prorationDate = prorationDate;
diff --git a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java
index e23d13bc509..e5d37ac3398 100644
--- a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java
@@ -118,7 +118,7 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams {
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
@SerializedName("proration_date")
Long prorationDate;
@@ -481,7 +481,7 @@ public Builder setProrationBehavior(
/**
* If set, the proration will be calculated as though the subscription was updated at the given
* time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
+ * href="https://stripe.com/api/invoices/create_preview">upcoming invoice endpoint.
*/
public Builder setProrationDate(Long prorationDate) {
this.prorationDate = prorationDate;
diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
index bd3ceca780d..295cf6995f5 100644
--- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
+++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java
@@ -226,8 +226,8 @@ public class SubscriptionUpdateParams extends ApiRequestParams {
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
@SerializedName("pending_invoice_item_interval")
Object pendingInvoiceItemInterval;
@@ -1006,8 +1006,8 @@ public Builder setPaymentSettings(SubscriptionUpdateParams.PaymentSettings payme
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
public Builder setPendingInvoiceItemInterval(
SubscriptionUpdateParams.PendingInvoiceItemInterval pendingInvoiceItemInterval) {
@@ -1017,8 +1017,8 @@ public Builder setPendingInvoiceItemInterval(
/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
- * calling Create an invoice for the
- * given subscription at the specified interval.
+ * calling Create an invoice for the given
+ * subscription at the specified interval.
*/
public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterval) {
this.pendingInvoiceItemInterval = pendingInvoiceItemInterval;
@@ -3837,7 +3837,7 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam {
public static class PauseCollection {
/**
* Required. The payment collection behavior for this subscription while
- * paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * paused.
*/
@SerializedName("behavior")
Behavior behavior;
@@ -3880,7 +3880,7 @@ public SubscriptionUpdateParams.PauseCollection build() {
/**
* Required. The payment collection behavior for this subscription while
- * paused. One of {@code keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
+ * paused.
*/
public Builder setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior behavior) {
this.behavior = behavior;
@@ -4879,7 +4879,7 @@ public Builder setRequestThreeDSecure(
@Getter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions {
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
@SerializedName("amount")
Long amount;
@@ -4939,7 +4939,7 @@ public static class Builder {
.MandateOptions(this.amount, this.amountType, this.description, this.extraParams);
}
- /** Amount to be charged for future payments. */
+ /** Amount to be charged for future payments, specified in the presentment currency. */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java
index d5676820498..bba110902f3 100644
--- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java
+++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java
@@ -645,7 +645,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam {
VERSION_2026_01_28_CLOVER("2026-01-28.clover"),
@SerializedName("2026-02-25.clover")
- VERSION_2026_02_25_CLOVER("2026-02-25.clover");
+ VERSION_2026_02_25_CLOVER("2026-02-25.clover"),
+
+ @SerializedName("2026-03-25.dahlia")
+ VERSION_2026_03_25_DAHLIA("2026-03-25.dahlia");
@Getter(onMethod_ = {@Override})
private final String value;
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index ffa2ecce311..1893de69ace 100644
--- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
+++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
@@ -196,6 +196,13 @@ public class SessionCreateParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
+ /**
+ * The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the
+ * same integration identifier.
+ */
+ @SerializedName("integration_identifier")
+ String integrationIdentifier;
+
/** Generate a post-purchase Invoice for one-time payments. */
@SerializedName("invoice_creation")
InvoiceCreation invoiceCreation;
@@ -456,6 +463,7 @@ private SessionCreateParams(
List expand,
Long expiresAt,
Map extraParams,
+ String integrationIdentifier,
InvoiceCreation invoiceCreation,
List lineItems,
Locale locale,
@@ -506,6 +514,7 @@ private SessionCreateParams(
this.expand = expand;
this.expiresAt = expiresAt;
this.extraParams = extraParams;
+ this.integrationIdentifier = integrationIdentifier;
this.invoiceCreation = invoiceCreation;
this.lineItems = lineItems;
this.locale = locale;
@@ -585,6 +594,8 @@ public static class Builder {
private Map extraParams;
+ private String integrationIdentifier;
+
private InvoiceCreation invoiceCreation;
private List lineItems;
@@ -666,6 +677,7 @@ public SessionCreateParams build() {
this.expand,
this.expiresAt,
this.extraParams,
+ this.integrationIdentifier,
this.invoiceCreation,
this.lineItems,
this.locale,
@@ -1008,6 +1020,15 @@ public Builder putAllExtraParam(Map map) {
return this;
}
+ /**
+ * The integration identifier for this Checkout Session. Multiple Checkout Sessions can have the
+ * same integration identifier.
+ */
+ public Builder setIntegrationIdentifier(String integrationIdentifier) {
+ this.integrationIdentifier = integrationIdentifier;
+ return this;
+ }
+
/** Generate a post-purchase Invoice for one-time payments. */
public Builder setInvoiceCreation(SessionCreateParams.InvoiceCreation invoiceCreation) {
this.invoiceCreation = invoiceCreation;
@@ -7218,6 +7239,10 @@ public static class PaymentMethodOptions {
@SerializedName("cashapp")
Cashapp cashapp;
+ /** contains details about the Crypto payment method options. */
+ @SerializedName("crypto")
+ Crypto crypto;
+
/** contains details about the Customer Balance payment method options. */
@SerializedName("customer_balance")
CustomerBalance customerBalance;
@@ -7347,6 +7372,10 @@ public static class PaymentMethodOptions {
@SerializedName("twint")
Twint twint;
+ /** contains details about the UPI payment method options. */
+ @SerializedName("upi")
+ Upi upi;
+
/** contains details about the Us Bank Account payment method options. */
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
@@ -7369,6 +7398,7 @@ private PaymentMethodOptions(
Boleto boleto,
Card card,
Cashapp cashapp,
+ Crypto crypto,
CustomerBalance customerBalance,
DemoPay demoPay,
Eps eps,
@@ -7400,6 +7430,7 @@ private PaymentMethodOptions(
Sofort sofort,
Swish swish,
Twint twint,
+ Upi upi,
UsBankAccount usBankAccount,
WechatPay wechatPay) {
this.acssDebit = acssDebit;
@@ -7415,6 +7446,7 @@ private PaymentMethodOptions(
this.boleto = boleto;
this.card = card;
this.cashapp = cashapp;
+ this.crypto = crypto;
this.customerBalance = customerBalance;
this.demoPay = demoPay;
this.eps = eps;
@@ -7446,6 +7478,7 @@ private PaymentMethodOptions(
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
+ this.upi = upi;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
}
@@ -7481,6 +7514,8 @@ public static class Builder {
private Cashapp cashapp;
+ private Crypto crypto;
+
private CustomerBalance customerBalance;
private DemoPay demoPay;
@@ -7543,6 +7578,8 @@ public static class Builder {
private Twint twint;
+ private Upi upi;
+
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
@@ -7563,6 +7600,7 @@ public SessionCreateParams.PaymentMethodOptions build() {
this.boleto,
this.card,
this.cashapp,
+ this.crypto,
this.customerBalance,
this.demoPay,
this.eps,
@@ -7594,6 +7632,7 @@ public SessionCreateParams.PaymentMethodOptions build() {
this.sofort,
this.swish,
this.twint,
+ this.upi,
this.usBankAccount,
this.wechatPay);
}
@@ -7681,6 +7720,12 @@ public Builder setCashapp(SessionCreateParams.PaymentMethodOptions.Cashapp casha
return this;
}
+ /** contains details about the Crypto payment method options. */
+ public Builder setCrypto(SessionCreateParams.PaymentMethodOptions.Crypto crypto) {
+ this.crypto = crypto;
+ return this;
+ }
+
/** contains details about the Customer Balance payment method options. */
public Builder setCustomerBalance(
SessionCreateParams.PaymentMethodOptions.CustomerBalance customerBalance) {
@@ -7889,6 +7934,12 @@ public Builder setTwint(SessionCreateParams.PaymentMethodOptions.Twint twint) {
return this;
}
+ /** contains details about the UPI payment method options. */
+ public Builder setUpi(SessionCreateParams.PaymentMethodOptions.Upi upi) {
+ this.upi = upi;
+ return this;
+ }
+
/** contains details about the Us Bank Account payment method options. */
public Builder setUsBankAccount(
SessionCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) {
@@ -10641,6 +10692,128 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
}
}
+ @Getter
+ @EqualsAndHashCode(callSuper = false)
+ public static class Crypto {
+ /**
+ * 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