All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.param.PaymentIntentCreateParams Maven / Gradle / Ivy

There is a newer version: 28.2.0
Show newest version
// Generated by delombok at Wed Jun 10 17:29:55 PDT 2020
package com.stripe.param;

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PaymentIntentCreateParams extends ApiRequestParams {
  /**
   * Amount intended to be collected by this PaymentIntent. A positive integer representing how much
   * to charge in the smallest currency
   * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The
   * minimum amount is $0.50 US or equivalent in
   * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999
   * for a USD charge of $999,999.99).
   */
  @SerializedName("amount")
  Long amount;
  /**
   * The amount of the application fee (if any) that will be applied to the payment and transferred
   * to the application owner's Stripe account. For more information, see the PaymentIntents use case for connected accounts.
   */
  @SerializedName("application_fee_amount")
  Long applicationFeeAmount;
  /**
   * Controls when the funds will be captured from the customer's account.
   */
  @SerializedName("capture_method")
  CaptureMethod captureMethod;
  /**
   * Set to {@code true} to attempt to confirm this PaymentIntent
   * immediately. This parameter defaults to {@code false}. When creating and confirming a
   * PaymentIntent at the same time, parameters available in the confirm API may also be
   * provided.
   */
  @SerializedName("confirm")
  Boolean confirm;
  @SerializedName("confirmation_method")
  ConfirmationMethod confirmationMethod;
  /**
   * Three-letter ISO currency code,
   * in lowercase. Must be a supported currency.
   */
  @SerializedName("currency")
  String currency;
  /**
   * ID of the Customer this PaymentIntent belongs to, if one exists.
   *
   * 

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If present in combination with setup_future_usage, * this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent * has been confirmed and any required actions from the user are complete. */ @SerializedName("customer") String customer; /** * An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. This parameter is intended for simpler integrations that do not handle * customer actions, like saving cards without * authentication. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("error_on_requires_action") Boolean errorOnRequiresAction; /** * Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized as if the key is a root-level field (serialized) name in this * param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("mandate") String mandate; /** * This hash contains details about the Mandate to create. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("mandate_data") MandateData mandateData; /** * 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; /** * Set to {@code true} to indicate that the customer is not in your checkout flow during this * payment attempt, and therefore is unable to authenticate. This parameter is intended for * scenarios where you collect card details and charge them later. This * parameter can only be used with {@code * confirm=true}. */ @SerializedName("off_session") Object offSession; /** * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents * use case for connected * accounts. */ @SerializedName("on_behalf_of") String onBehalfOf; /** * ID of the payment method (a PaymentMethod, Card, or compatible Source * object) to attach to this PaymentIntent. * *

If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, {@code source} will be automatically populated with {@code * customer.default_source} to improve the migration experience for users of the Charges API. We * recommend that you explicitly provide the {@code payment_method} going forward. */ @SerializedName("payment_method") String paymentMethod; /** * Payment-method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this * is not provided, defaults to ["card"]. */ @SerializedName("payment_method_types") List paymentMethodTypes; /** * Email address that the receipt for the resulting payment will be sent to. */ @SerializedName("receipt_email") String receiptEmail; /** * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. If you'd prefer to redirect to a mobile application, you can * alternatively supply an application URI scheme. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("return_url") String returnUrl; /** * If the PaymentIntent has a {@code payment_method} and a {@code customer} or if you're attaching * a payment method to the PaymentIntent in this request, you can pass {@code * save_payment_method=true} to save the payment method to the customer immediately. * *

If the payment method is already saved to a customer, this parameter does nothing. If this * type of payment method cannot be saved to a customer, the request will error. * *

Saving a payment method using this parameter is not recommended because it will * save the payment method even if it cannot be charged (e.g. the user made a typo). To ensure * that only payment methods which are likely to be chargeable are saved to a customer, use the * (setup_future_usage)[#payment_intents/object#payment_intent_object-setup_future_usage] * property, which saves the payment method after the PaymentIntent has been confirmed and all * required actions by the customer are complete. */ @SerializedName("save_payment_method") Boolean savePaymentMethod; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * *

Providing this parameter will attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required * actions from the user are complete. If no Customer was provided, the payment method can still * be attached to a Customer * after the transaction completes. * *

When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically * optimize your payment flow and comply with regional legislation and network rules, such as SCA. */ @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; /** * Shipping information for this PaymentIntent. */ @SerializedName("shipping") Shipping shipping; /** * This is a legacy field that will be removed in the future. It is the ID of the Source object to * attach to this PaymentIntent. Please use the {@code payment_method} field instead, which also * supports Cards and compatible Source * objects.If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, this field will be automatically populated with {@code * customer.default_source} to improve the migration experience for users of the Charges API. We * recommend that you explicitly provide the {@code source} or {@code payment_method} parameter * going forward. */ @SerializedName("source") String source; /** * For non-card charges, you can use this value as the complete description that appears on your * customers’ statements. Must contain at least one letter, maximum 22 characters. */ @SerializedName("statement_descriptor") String statementDescriptor; /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** * The parameters used to automatically create a Transfer when the payment succeeds. For more * information, see the PaymentIntents use case for connected accounts. */ @SerializedName("transfer_data") TransferData transferData; /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts * for details. */ @SerializedName("transfer_group") String transferGroup; /** * Set to {@code true} only when using manual confirmation and the iOS or Android SDKs to handle * additional authentication steps. */ @SerializedName("use_stripe_sdk") Boolean useStripeSdk; private PaymentIntentCreateParams(Long amount, Long applicationFeeAmount, CaptureMethod captureMethod, Boolean confirm, ConfirmationMethod confirmationMethod, String currency, String customer, String description, Boolean errorOnRequiresAction, List expand, Map extraParams, String mandate, MandateData mandateData, Map metadata, Object offSession, String onBehalfOf, String paymentMethod, PaymentMethodOptions paymentMethodOptions, List paymentMethodTypes, String receiptEmail, String returnUrl, Boolean savePaymentMethod, SetupFutureUsage setupFutureUsage, Shipping shipping, String source, String statementDescriptor, String statementDescriptorSuffix, TransferData transferData, String transferGroup, Boolean useStripeSdk) { this.amount = amount; this.applicationFeeAmount = applicationFeeAmount; this.captureMethod = captureMethod; this.confirm = confirm; this.confirmationMethod = confirmationMethod; this.currency = currency; this.customer = customer; this.description = description; this.errorOnRequiresAction = errorOnRequiresAction; this.expand = expand; this.extraParams = extraParams; this.mandate = mandate; this.mandateData = mandateData; this.metadata = metadata; this.offSession = offSession; this.onBehalfOf = onBehalfOf; this.paymentMethod = paymentMethod; this.paymentMethodOptions = paymentMethodOptions; this.paymentMethodTypes = paymentMethodTypes; this.receiptEmail = receiptEmail; this.returnUrl = returnUrl; this.savePaymentMethod = savePaymentMethod; this.setupFutureUsage = setupFutureUsage; this.shipping = shipping; this.source = source; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; this.transferData = transferData; this.transferGroup = transferGroup; this.useStripeSdk = useStripeSdk; } public static Builder builder() { return new Builder(); } public static class Builder { private Long amount; private Long applicationFeeAmount; private CaptureMethod captureMethod; private Boolean confirm; private ConfirmationMethod confirmationMethod; private String currency; private String customer; private String description; private Boolean errorOnRequiresAction; private List expand; private Map extraParams; private String mandate; private MandateData mandateData; private Map metadata; private Object offSession; private String onBehalfOf; private String paymentMethod; private PaymentMethodOptions paymentMethodOptions; private List paymentMethodTypes; private String receiptEmail; private String returnUrl; private Boolean savePaymentMethod; private SetupFutureUsage setupFutureUsage; private Shipping shipping; private String source; private String statementDescriptor; private String statementDescriptorSuffix; private TransferData transferData; private String transferGroup; private Boolean useStripeSdk; /** * Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams build() { return new PaymentIntentCreateParams(this.amount, this.applicationFeeAmount, this.captureMethod, this.confirm, this.confirmationMethod, this.currency, this.customer, this.description, this.errorOnRequiresAction, this.expand, this.extraParams, this.mandate, this.mandateData, this.metadata, this.offSession, this.onBehalfOf, this.paymentMethod, this.paymentMethodOptions, this.paymentMethodTypes, this.receiptEmail, this.returnUrl, this.savePaymentMethod, this.setupFutureUsage, this.shipping, this.source, this.statementDescriptor, this.statementDescriptorSuffix, this.transferData, this.transferGroup, this.useStripeSdk); } /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how * much to charge in the smallest * currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal * currency). The minimum amount is $0.50 US or equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ public Builder setAmount(Long amount) { this.amount = amount; return this; } /** * The amount of the application fee (if any) that will be applied to the payment and * transferred to the application owner's Stripe account. For more information, see the * PaymentIntents use case for * connected accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; return this; } /** * Controls when the funds will be captured from the customer's account. */ public Builder setCaptureMethod(CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } /** * Set to {@code true} to attempt to confirm this PaymentIntent * immediately. This parameter defaults to {@code false}. When creating and confirming a * PaymentIntent at the same time, parameters available in the confirm API may also be * provided. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; return this; } public Builder setConfirmationMethod(ConfirmationMethod confirmationMethod) { this.confirmationMethod = confirmationMethod; return this; } /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ public Builder setCurrency(String currency) { this.currency = currency; return this; } /** * ID of the Customer this PaymentIntent belongs to, if one exists. * *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If present in combination with setup_future_usage, * this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent * has been confirmed and any required actions from the user are complete. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } /** * An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; return this; } /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. This parameter is intended for simpler integrations that do not handle * customer actions, like saving cards without * authentication. This parameter can only be used with {@code * confirm=true}. */ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { this.errorOnRequiresAction = errorOnRequiresAction; return this; } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * PaymentIntentCreateParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.add(element); return this; } /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * PaymentIntentCreateParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * PaymentIntentCreateParams#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#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ public Builder setMandate(String mandate) { this.mandate = mandate; return this; } /** * This hash contains details about the Mandate to create. This parameter can only be used with * {@code * confirm=true}. */ public Builder setMandateData(MandateData mandateData) { this.mandateData = mandateData; 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 * PaymentIntentCreateParams#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 PaymentIntentCreateParams#metadata} for the field documentation. */ public Builder putAllMetadata(Map map) { if (this.metadata == null) { this.metadata = new HashMap<>(); } this.metadata.putAll(map); return this; } /** * Set to {@code true} to indicate that the customer is not in your checkout flow during this * payment attempt, and therefore is unable to authenticate. This parameter is intended for * scenarios where you collect card details and charge them later. * This parameter can only be used with {@code * confirm=true}. */ public Builder setOffSession(Boolean offSession) { this.offSession = offSession; return this; } /** * Set to {@code true} to indicate that the customer is not in your checkout flow during this * payment attempt, and therefore is unable to authenticate. This parameter is intended for * scenarios where you collect card details and charge them later. * This parameter can only be used with {@code * confirm=true}. */ public Builder setOffSession(OffSession offSession) { this.offSession = offSession; return this; } /** * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents * use case for connected * accounts. */ public Builder setOnBehalfOf(String onBehalfOf) { this.onBehalfOf = onBehalfOf; return this; } /** * ID of the payment method (a PaymentMethod, Card, or compatible Source * object) to attach to this PaymentIntent. * *

If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, {@code source} will be automatically populated with * {@code customer.default_source} to improve the migration experience for users of the Charges * API. We recommend that you explicitly provide the {@code payment_method} going forward. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; return this; } /** * Payment-method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions(PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; return this; } /** * Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * PaymentIntentCreateParams#paymentMethodTypes} for the field documentation. */ public Builder addPaymentMethodType(String element) { if (this.paymentMethodTypes == null) { this.paymentMethodTypes = new ArrayList<>(); } this.paymentMethodTypes.add(element); return this; } /** * Add all elements to `paymentMethodTypes` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See * {@link PaymentIntentCreateParams#paymentMethodTypes} for the field documentation. */ public Builder addAllPaymentMethodType(List elements) { if (this.paymentMethodTypes == null) { this.paymentMethodTypes = new ArrayList<>(); } this.paymentMethodTypes.addAll(elements); return this; } /** * Email address that the receipt for the resulting payment will be sent to. */ public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; return this; } /** * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. If you'd prefer to redirect to a mobile application, you * can alternatively supply an application URI scheme. This parameter can only be used with {@code * confirm=true}. */ public Builder setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; return this; } /** * If the PaymentIntent has a {@code payment_method} and a {@code customer} or if you're * attaching a payment method to the PaymentIntent in this request, you can pass {@code * save_payment_method=true} to save the payment method to the customer immediately. * *

If the payment method is already saved to a customer, this parameter does nothing. If this * type of payment method cannot be saved to a customer, the request will error. * *

Saving a payment method using this parameter is not recommended because it will * save the payment method even if it cannot be charged (e.g. the user made a typo). To ensure * that only payment methods which are likely to be chargeable are saved to a customer, use the * (setup_future_usage)[#payment_intents/object#payment_intent_object-setup_future_usage] * property, which saves the payment method after the PaymentIntent has been confirmed and all * required actions by the customer are complete. */ public Builder setSavePaymentMethod(Boolean savePaymentMethod) { this.savePaymentMethod = savePaymentMethod; return this; } /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * *

Providing this parameter will attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any * required actions from the user are complete. If no Customer was provided, the payment method * can still be attached to a * Customer after the transaction completes. * *

When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically * optimize your payment flow and comply with regional legislation and network rules, such as SCA. */ public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } /** * Shipping information for this PaymentIntent. */ public Builder setShipping(Shipping shipping) { this.shipping = shipping; return this; } /** * This is a legacy field that will be removed in the future. It is the ID of the Source object * to attach to this PaymentIntent. Please use the {@code payment_method} field instead, which * also supports Cards and compatible Source * objects.If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, this field will be automatically populated with {@code * customer.default_source} to improve the migration experience for users of the Charges API. We * recommend that you explicitly provide the {@code source} or {@code payment_method} parameter * going forward. */ public Builder setSource(String source) { this.source = source; return this; } /** * For non-card charges, you can use this value as the complete description that appears on your * customers’ statements. Must contain at least one letter, maximum 22 characters. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; return this; } /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the * account to form the complete statement descriptor. Maximum 22 characters for the concatenated * descriptor. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; return this; } /** * The parameters used to automatically create a Transfer when the payment succeeds. For more * information, see the PaymentIntents use case for connected * accounts. */ public Builder setTransferData(TransferData transferData) { this.transferData = transferData; return this; } /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected * accounts for details. */ public Builder setTransferGroup(String transferGroup) { this.transferGroup = transferGroup; return this; } /** * Set to {@code true} only when using manual confirmation and the iOS or Android SDKs to handle * additional authentication steps. */ public Builder setUseStripeSdk(Boolean useStripeSdk) { this.useStripeSdk = useStripeSdk; return this; } } public static class MandateData { /** * This hash contains details about the customer acceptance of the Mandate. */ @SerializedName("customer_acceptance") CustomerAcceptance customerAcceptance; /** * 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 MandateData(CustomerAcceptance customerAcceptance, Map extraParams) { this.customerAcceptance = customerAcceptance; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private CustomerAcceptance customerAcceptance; private Map extraParams; /** * Finalize and obtain parameter instance from this builder. */ public MandateData build() { return new MandateData(this.customerAcceptance, this.extraParams); } /** * This hash contains details about the customer acceptance of the Mandate. */ public Builder setCustomerAcceptance(CustomerAcceptance customerAcceptance) { this.customerAcceptance = customerAcceptance; 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.MandateData#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.MandateData#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 static class CustomerAcceptance { /** The time at which the customer accepted the Mandate. */ @SerializedName("accepted_at") Long acceptedAt; /** * 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; /** * If this is a Mandate accepted offline, this hash contains details about the offline * acceptance. */ @SerializedName("offline") Offline offline; /** * If this is a Mandate accepted online, this hash contains details about the online * acceptance. */ @SerializedName("online") Online online; /** * The type of customer acceptance information included with the Mandate. One of {@code * online} or {@code offline}. */ @SerializedName("type") Type type; private CustomerAcceptance(Long acceptedAt, Map extraParams, Offline offline, Online online, Type type) { this.acceptedAt = acceptedAt; this.extraParams = extraParams; this.offline = offline; this.online = online; this.type = type; } public static Builder builder() { return new Builder(); } public static class Builder { private Long acceptedAt; private Map extraParams; private Offline offline; private Online online; private Type type; /** Finalize and obtain parameter instance from this builder. */ public CustomerAcceptance build() { return new CustomerAcceptance(this.acceptedAt, this.extraParams, this.offline, this.online, this.type); } /** The time at which the customer accepted the Mandate. */ public Builder setAcceptedAt(Long acceptedAt) { this.acceptedAt = acceptedAt; 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.MandateData.CustomerAcceptance#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.MandateData.CustomerAcceptance#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * If this is a Mandate accepted offline, this hash contains details about the offline * acceptance. */ public Builder setOffline(Offline offline) { this.offline = offline; return this; } /** * If this is a Mandate accepted online, this hash contains details about the online * acceptance. */ public Builder setOnline(Online online) { this.online = online; return this; } /** * The type of customer acceptance information included with the Mandate. One of {@code * online} or {@code offline}. */ public Builder setType(Type type) { this.type = type; return this; } } public static class Offline { /** * 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 Offline(Map extraParams) { this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public Offline build() { return new Offline(this.extraParams); } /** * 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.MandateData.CustomerAcceptance.Offline#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.MandateData.CustomerAcceptance.Offline#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } } public static class Online { /** * 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 IP address from which the Mandate was accepted by the customer. */ @SerializedName("ip_address") String ipAddress; /** The user agent of the browser from which the Mandate was accepted by the customer. */ @SerializedName("user_agent") String userAgent; private Online(Map extraParams, String ipAddress, String userAgent) { this.extraParams = extraParams; this.ipAddress = ipAddress; this.userAgent = userAgent; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private String ipAddress; private String userAgent; /** Finalize and obtain parameter instance from this builder. */ public Online build() { return new Online(this.extraParams, this.ipAddress, this.userAgent); } /** * 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.MandateData.CustomerAcceptance.Online#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.MandateData.CustomerAcceptance.Online#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 IP address from which the Mandate was accepted by the customer. */ public Builder setIpAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } public Builder setUserAgent(String userAgent) { this.userAgent = userAgent; return this; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getIpAddress() { return this.ipAddress; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getUserAgent() { return this.userAgent; } } public enum Type implements ApiRequestParams.EnumParam { @SerializedName("offline") OFFLINE("offline"), @SerializedName("online") ONLINE("online"); private final String value; Type(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Long getAcceptedAt() { return this.acceptedAt; } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public Offline getOffline() { return this.offline; } @java.lang.SuppressWarnings("all") @lombok.Generated public Online getOnline() { return this.online; } @java.lang.SuppressWarnings("all") @lombok.Generated public Type getType() { return this.type; } } /** * This hash contains details about the customer acceptance of the Mandate. */ @java.lang.SuppressWarnings("all") @lombok.Generated public CustomerAcceptance getCustomerAcceptance() { return this.customerAcceptance; } /** * 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. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } } /** * The user agent of the browser from which the Mandate was accepted by the customer. */ public static class PaymentMethodOptions { /** * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the * Bancontact payment method options. */ @SerializedName("bancontact") Object bancontact; /** * Configuration for any card payments attempted on this PaymentIntent. */ @SerializedName("card") Object card; /** * 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 PaymentMethodOptions(Object bancontact, Object card, Map extraParams) { this.bancontact = bancontact; this.card = card; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Object bancontact; private Object card; private Map extraParams; /** * Finalize and obtain parameter instance from this builder. */ public PaymentMethodOptions build() { return new PaymentMethodOptions(this.bancontact, this.card, this.extraParams); } /** * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the * Bancontact payment method options. */ public Builder setBancontact(Bancontact bancontact) { this.bancontact = bancontact; return this; } /** * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the * Bancontact payment method options. */ public Builder setBancontact(EmptyParam bancontact) { this.bancontact = bancontact; return this; } /** * Configuration for any card payments attempted on this PaymentIntent. */ public Builder setCard(Card card) { this.card = card; return this; } /** * Configuration for any card payments attempted on this PaymentIntent. */ public Builder setCard(EmptyParam card) { this.card = card; 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#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#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 static class Bancontact { /** * 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; /** * Preferred language of the Bancontact authorization page that the customer is redirected to. */ @SerializedName("preferred_language") PreferredLanguage preferredLanguage; private Bancontact(Map extraParams, PreferredLanguage preferredLanguage) { this.extraParams = extraParams; this.preferredLanguage = preferredLanguage; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private PreferredLanguage preferredLanguage; /** * Finalize and obtain parameter instance from this builder. */ public Bancontact build() { return new Bancontact(this.extraParams, this.preferredLanguage); } /** * 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.Bancontact#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.Bancontact#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Preferred language of the Bancontact authorization page that the customer is redirected * to. */ public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) { this.preferredLanguage = preferredLanguage; return this; } } public enum PreferredLanguage implements ApiRequestParams.EnumParam { @SerializedName("de") DE("de"), @SerializedName("en") EN("en"), @SerializedName("fr") FR("fr"), @SerializedName("nl") NL("nl"); private final String value; PreferredLanguage(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } /** * 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. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } /** * Preferred language of the Bancontact authorization page that the customer is redirected to. */ @java.lang.SuppressWarnings("all") @lombok.Generated public PreferredLanguage getPreferredLanguage() { return this.preferredLanguage; } } public static class Card { /** * 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; /** * Installment configuration for payments attempted on this PaymentIntent (Mexico Only). * *

For more information, see the installments integration guide. */ @SerializedName("installments") Installments installments; /** * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided * during confirmation. */ @SerializedName("moto") Boolean moto; /** * Selected network to process this PaymentIntent on. Depends on the available networks of the * card attached to the PaymentIntent. Can be only set confirm-time. */ @SerializedName("network") Network network; /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Permitted values include: {@code automatic} or {@code any}. If not * provided, defaults to {@code automatic}. Read our guide on manually requesting 3D * Secure for more information on how this configuration interacts with Radar and our SCA * Engine. */ @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; private Card(Map extraParams, Installments installments, Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure) { this.extraParams = extraParams; this.installments = installments; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private Installments installments; private Boolean moto; private Network network; private RequestThreeDSecure requestThreeDSecure; /** Finalize and obtain parameter instance from this builder. */ public Card build() { return new Card(this.extraParams, this.installments, this.moto, this.network, this.requestThreeDSecure); } /** * 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.Card#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.Card#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Installment configuration for payments attempted on this PaymentIntent (Mexico Only). * *

For more information, see the installments integration guide. */ public Builder setInstallments(Installments installments) { this.installments = installments; return this; } /** * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided * during confirmation. */ public Builder setMoto(Boolean moto) { this.moto = moto; return this; } /** * Selected network to process this PaymentIntent on. Depends on the available networks of * the card attached to the PaymentIntent. Can be only set confirm-time. */ public Builder setNetwork(Network network) { this.network = network; return this; } /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Permitted values include: {@code automatic} or {@code any}. If not * provided, defaults to {@code automatic}. Read our guide on manually requesting 3D * Secure for more information on how this configuration interacts with Radar and our * SCA Engine. */ public Builder setRequestThreeDSecure(RequestThreeDSecure requestThreeDSecure) { this.requestThreeDSecure = requestThreeDSecure; return this; } } public static class Installments { /** * Setting to true enables installments for this PaymentIntent. This will cause the response * to contain a list of available installment plans. Setting to false will prevent any * selected plan from applying to a charge. */ @SerializedName("enabled") Boolean enabled; /** * 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 selected installment plan to use for this payment attempt. This parameter can only be * provided during confirmation. */ @SerializedName("plan") Object plan; private Installments(Boolean enabled, Map extraParams, Object plan) { this.enabled = enabled; this.extraParams = extraParams; this.plan = plan; } public static Builder builder() { return new Builder(); } public static class Builder { private Boolean enabled; private Map extraParams; private Object plan; /** Finalize and obtain parameter instance from this builder. */ public Installments build() { return new Installments(this.enabled, this.extraParams, this.plan); } /** * Setting to true enables installments for this PaymentIntent. This will cause the * response to contain a list of available installment plans. Setting to false will * prevent any selected plan from applying to a charge. */ public Builder setEnabled(Boolean enabled) { this.enabled = enabled; 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.Card.Installments#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.Card.Installments#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 selected installment plan to use for this payment attempt. This parameter can only * be provided during confirmation. */ public Builder setPlan(Plan plan) { this.plan = plan; return this; } /** * The selected installment plan to use for this payment attempt. This parameter can only * be provided during confirmation. */ public Builder setPlan(EmptyParam plan) { this.plan = plan; return this; } } public static class Plan { /** * For {@code fixed_count} installment plans, this is the number of installment payments * your customer will make to their credit card. */ @SerializedName("count") Long count; /** * 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; /** * For {@code fixed_count} installment plans, this is the interval between installment * payments your customer will make to their credit card. One of {@code month}. */ @SerializedName("interval") Interval interval; /** Type of installment plan, one of {@code fixed_count}. */ @SerializedName("type") Type type; private Plan(Long count, Map extraParams, Interval interval, Type type) { this.count = count; this.extraParams = extraParams; this.interval = interval; this.type = type; } public static Builder builder() { return new Builder(); } public static class Builder { private Long count; private Map extraParams; private Interval interval; private Type type; /** Finalize and obtain parameter instance from this builder. */ public Plan build() { return new Plan(this.count, this.extraParams, this.interval, this.type); } /** * For {@code fixed_count} installment plans, this is the number of installment payments * your customer will make to their credit card. */ public Builder setCount(Long count) { this.count = count; 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.Card.Installments.Plan#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.Card.Installments.Plan#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * For {@code fixed_count} installment plans, this is the interval between installment * payments your customer will make to their credit card. One of {@code month}. */ public Builder setInterval(Interval interval) { this.interval = interval; return this; } public Builder setType(Type type) { this.type = type; return this; } } public enum Interval implements ApiRequestParams.EnumParam { @SerializedName("month") MONTH("month"); private final String value; Interval(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fixed_count") FIXED_COUNT("fixed_count"); private final String value; Type(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Long getCount() { return this.count; } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public Interval getInterval() { return this.interval; } @java.lang.SuppressWarnings("all") @lombok.Generated public Type getType() { return this.type; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getEnabled() { return this.enabled; } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public Object getPlan() { return this.plan; } } public enum Network implements ApiRequestParams.EnumParam { @SerializedName("amex") AMEX("amex"), @SerializedName("cartes_bancaires") CARTES_BANCAIRES("cartes_bancaires"), @SerializedName("diners") DINERS("diners"), @SerializedName("discover") DISCOVER("discover"), @SerializedName("interac") INTERAC("interac"), @SerializedName("jcb") JCB("jcb"), @SerializedName("mastercard") MASTERCARD("mastercard"), @SerializedName("unionpay") UNIONPAY("unionpay"), @SerializedName("unknown") UNKNOWN("unknown"), @SerializedName("visa") VISA("visa"); private final String value; Network(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { @SerializedName("any") ANY("any"), @SerializedName("automatic") AUTOMATIC("automatic"); private final String value; RequestThreeDSecure(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public Installments getInstallments() { return this.installments; } @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getMoto() { return this.moto; } @java.lang.SuppressWarnings("all") @lombok.Generated public Network getNetwork() { return this.network; } @java.lang.SuppressWarnings("all") @lombok.Generated public RequestThreeDSecure getRequestThreeDSecure() { return this.requestThreeDSecure; } } /** * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the * Bancontact payment method options. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Object getBancontact() { return this.bancontact; } /** * Configuration for any card payments attempted on this PaymentIntent. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Object getCard() { return this.card; } /** * 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. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } } /** * Type of installment plan, one of {@code fixed_count}. */ public static class Shipping { /** * Shipping address. */ @SerializedName("address") Address address; /** * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ @SerializedName("carrier") String carrier; /** * 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; /** * Recipient name. */ @SerializedName("name") String name; /** * Recipient phone (including extension). */ @SerializedName("phone") String phone; /** * The tracking number for a physical product, obtained from the delivery service. If multiple * tracking numbers were generated for this purchase, please separate them with commas. */ @SerializedName("tracking_number") String trackingNumber; private Shipping(Address address, String carrier, Map extraParams, String name, String phone, String trackingNumber) { this.address = address; this.carrier = carrier; this.extraParams = extraParams; this.name = name; this.phone = phone; this.trackingNumber = trackingNumber; } public static Builder builder() { return new Builder(); } public static class Builder { private Address address; private String carrier; private Map extraParams; private String name; private String phone; private String trackingNumber; /** * Finalize and obtain parameter instance from this builder. */ public Shipping build() { return new Shipping(this.address, this.carrier, this.extraParams, this.name, this.phone, this.trackingNumber); } /** * Shipping address. */ public Builder setAddress(Address address) { this.address = address; return this; } /** * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ public Builder setCarrier(String carrier) { this.carrier = carrier; 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.Shipping#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.Shipping#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Recipient name. */ public Builder setName(String name) { this.name = name; return this; } /** * Recipient phone (including extension). */ public Builder setPhone(String phone) { this.phone = phone; return this; } /** * The tracking number for a physical product, obtained from the delivery service. If multiple * tracking numbers were generated for this purchase, please separate them with commas. */ public Builder setTrackingNumber(String trackingNumber) { this.trackingNumber = trackingNumber; return this; } } public static class Address { /** City, district, suburb, town, or village. */ @SerializedName("city") String city; /** * Two-letter country code (ISO * 3166-1 alpha-2). */ @SerializedName("country") String country; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** Address line 1 (e.g., street, PO Box, or company name). */ @SerializedName("line1") String line1; /** Address line 2 (e.g., apartment, suite, unit, or building). */ @SerializedName("line2") String line2; /** ZIP or postal code. */ @SerializedName("postal_code") String postalCode; /** State, county, province, or region. */ @SerializedName("state") String state; private Address(String city, String country, Map extraParams, String line1, String line2, String postalCode, String state) { this.city = city; this.country = country; this.extraParams = extraParams; this.line1 = line1; this.line2 = line2; this.postalCode = postalCode; this.state = state; } public static Builder builder() { return new Builder(); } public static class Builder { private String city; private String country; private Map extraParams; private String line1; private String line2; private String postalCode; private String state; /** Finalize and obtain parameter instance from this builder. */ public Address build() { return new Address(this.city, this.country, this.extraParams, this.line1, this.line2, this.postalCode, this.state); } /** City, district, suburb, town, or village. */ public Builder setCity(String city) { this.city = city; return this; } /** * Two-letter country code (ISO * 3166-1 alpha-2). */ public Builder setCountry(String country) { this.country = country; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link PaymentIntentCreateParams.Shipping.Address#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link PaymentIntentCreateParams.Shipping.Address#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** Address line 1 (e.g., street, PO Box, or company name). */ public Builder setLine1(String line1) { this.line1 = line1; return this; } /** Address line 2 (e.g., apartment, suite, unit, or building). */ public Builder setLine2(String line2) { this.line2 = line2; return this; } /** ZIP or postal code. */ public Builder setPostalCode(String postalCode) { this.postalCode = postalCode; return this; } public Builder setState(String state) { this.state = state; return this; } } @java.lang.SuppressWarnings("all") @lombok.Generated public String getCity() { return this.city; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getCountry() { return this.country; } @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getLine1() { return this.line1; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getLine2() { return this.line2; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getPostalCode() { return this.postalCode; } @java.lang.SuppressWarnings("all") @lombok.Generated public String getState() { return this.state; } } /** * Shipping address. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Address getAddress() { return this.address; } /** * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getCarrier() { return this.carrier; } /** * 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. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } /** * Recipient name. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getName() { return this.name; } /** * Recipient phone (including extension). */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getPhone() { return this.phone; } /** * The tracking number for a physical product, obtained from the delivery service. If multiple * tracking numbers were generated for this purchase, please separate them with commas. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getTrackingNumber() { return this.trackingNumber; } } /** * State, county, province, or region. */ public static class TransferData { /** * The amount that will be transferred automatically when a charge succeeds. The amount is * capped at the total transaction amount and if no amount is set, the full amount is * transferred. * *

If you intend to collect a fee and you need a more robust reporting experience, using application_fee_amount * might be a better fit for your integration. */ @SerializedName("amount") Long amount; /** * If specified, successful charges will be attributed to the destination account for tax * reporting, and the funds from charges will be transferred to the destination account. The ID * of the resulting transfer will be returned on the successful charge's {@code transfer} field. */ @SerializedName("destination") String destination; /** * 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 TransferData(Long amount, String destination, Map extraParams) { this.amount = amount; this.destination = destination; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Long amount; private String destination; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public TransferData build() { return new TransferData(this.amount, this.destination, this.extraParams); } /** * The amount that will be transferred automatically when a charge succeeds. The amount is * capped at the total transaction amount and if no amount is set, the full amount is * transferred. * *

If you intend to collect a fee and you need a more robust reporting experience, using application_fee_amount * might be a better fit for your integration. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } /** * If specified, successful charges will be attributed to the destination account for tax * reporting, and the funds from charges will be transferred to the destination account. The * ID of the resulting transfer will be returned on the successful charge's {@code transfer} * field. */ public Builder setDestination(String destination) { this.destination = destination; 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.TransferData#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; } public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } } /** * The amount that will be transferred automatically when a charge succeeds. The amount is * capped at the total transaction amount and if no amount is set, the full amount is * transferred. * *

If you intend to collect a fee and you need a more robust reporting experience, using application_fee_amount * might be a better fit for your integration. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Long getAmount() { return this.amount; } /** * If specified, successful charges will be attributed to the destination account for tax * reporting, and the funds from charges will be transferred to the destination account. The ID * of the resulting transfer will be returned on the successful charge's {@code transfer} field. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getDestination() { return this.destination; } /** * 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. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } } /** * 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.TransferData#extraParams} for the field documentation. */ public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), @SerializedName("manual") MANUAL("manual"); private final String value; CaptureMethod(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } public enum ConfirmationMethod implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), @SerializedName("manual") MANUAL("manual"); private final String value; ConfirmationMethod(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } public enum OffSession implements ApiRequestParams.EnumParam { @SerializedName("one_off") ONE_OFF("one_off"), @SerializedName("recurring") RECURRING("recurring"); private final String value; OffSession(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("off_session") OFF_SESSION("off_session"), @SerializedName("on_session") ON_SESSION("on_session"); private final String value; SetupFutureUsage(String value) { this.value = value; } @Override @java.lang.SuppressWarnings("all") @lombok.Generated public String getValue() { return this.value; } } /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much * to charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The * minimum amount is $0.50 US or equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @java.lang.SuppressWarnings("all") @lombok.Generated public Long getAmount() { return this.amount; } /** * The amount of the application fee (if any) that will be applied to the payment and transferred * to the application owner's Stripe account. For more information, see the PaymentIntents use case for connected accounts. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Long getApplicationFeeAmount() { return this.applicationFeeAmount; } /** * Controls when the funds will be captured from the customer's account. */ @java.lang.SuppressWarnings("all") @lombok.Generated public CaptureMethod getCaptureMethod() { return this.captureMethod; } /** * Set to {@code true} to attempt to confirm this PaymentIntent * immediately. This parameter defaults to {@code false}. When creating and confirming a * PaymentIntent at the same time, parameters available in the confirm API may also be * provided. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getConfirm() { return this.confirm; } @java.lang.SuppressWarnings("all") @lombok.Generated public ConfirmationMethod getConfirmationMethod() { return this.confirmationMethod; } /** * Three-letter ISO currency code, * in lowercase. Must be a supported currency. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getCurrency() { return this.currency; } /** * ID of the Customer this PaymentIntent belongs to, if one exists. * *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If present in combination with setup_future_usage, * this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent * has been confirmed and any required actions from the user are complete. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getCustomer() { return this.customer; } /** * An arbitrary string attached to the object. Often useful for displaying to users. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getDescription() { return this.description; } /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. This parameter is intended for simpler integrations that do not handle * customer actions, like saving cards without * authentication. This parameter can only be used with {@code * confirm=true}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getErrorOnRequiresAction() { return this.errorOnRequiresAction; } /** * Specifies which fields in the response should be expanded. */ @java.lang.SuppressWarnings("all") @lombok.Generated public List getExpand() { return this.expand; } /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized as if the key is a root-level field (serialized) name in this * param object. Effectively, this map is flattened to its parent instance. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getExtraParams() { return this.extraParams; } /** * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getMandate() { return this.mandate; } /** * This hash contains details about the Mandate to create. This parameter can only be used with {@code * confirm=true}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public MandateData getMandateData() { return this.mandateData; } /** * 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}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Map getMetadata() { return this.metadata; } /** * Set to {@code true} to indicate that the customer is not in your checkout flow during this * payment attempt, and therefore is unable to authenticate. This parameter is intended for * scenarios where you collect card details and charge them later. This * parameter can only be used with {@code * confirm=true}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Object getOffSession() { return this.offSession; } /** * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents * use case for connected * accounts. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getOnBehalfOf() { return this.onBehalfOf; } /** * ID of the payment method (a PaymentMethod, Card, or compatible Source * object) to attach to this PaymentIntent. * *

If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, {@code source} will be automatically populated with {@code * customer.default_source} to improve the migration experience for users of the Charges API. We * recommend that you explicitly provide the {@code payment_method} going forward. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getPaymentMethod() { return this.paymentMethod; } /** * Payment-method-specific configuration for this PaymentIntent. */ @java.lang.SuppressWarnings("all") @lombok.Generated public PaymentMethodOptions getPaymentMethodOptions() { return this.paymentMethodOptions; } /** * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this * is not provided, defaults to ["card"]. */ @java.lang.SuppressWarnings("all") @lombok.Generated public List getPaymentMethodTypes() { return this.paymentMethodTypes; } /** * Email address that the receipt for the resulting payment will be sent to. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getReceiptEmail() { return this.receiptEmail; } /** * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. If you'd prefer to redirect to a mobile application, you can * alternatively supply an application URI scheme. This parameter can only be used with {@code * confirm=true}. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getReturnUrl() { return this.returnUrl; } /** * If the PaymentIntent has a {@code payment_method} and a {@code customer} or if you're attaching * a payment method to the PaymentIntent in this request, you can pass {@code * save_payment_method=true} to save the payment method to the customer immediately. * *

If the payment method is already saved to a customer, this parameter does nothing. If this * type of payment method cannot be saved to a customer, the request will error. * *

Saving a payment method using this parameter is not recommended because it will * save the payment method even if it cannot be charged (e.g. the user made a typo). To ensure * that only payment methods which are likely to be chargeable are saved to a customer, use the * (setup_future_usage)[#payment_intents/object#payment_intent_object-setup_future_usage] * property, which saves the payment method after the PaymentIntent has been confirmed and all * required actions by the customer are complete. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getSavePaymentMethod() { return this.savePaymentMethod; } /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * *

Providing this parameter will attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required * actions from the user are complete. If no Customer was provided, the payment method can still * be attached to a Customer * after the transaction completes. * *

When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically * optimize your payment flow and comply with regional legislation and network rules, such as SCA. */ @java.lang.SuppressWarnings("all") @lombok.Generated public SetupFutureUsage getSetupFutureUsage() { return this.setupFutureUsage; } /** * Shipping information for this PaymentIntent. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Shipping getShipping() { return this.shipping; } /** * This is a legacy field that will be removed in the future. It is the ID of the Source object to * attach to this PaymentIntent. Please use the {@code payment_method} field instead, which also * supports Cards and compatible Source * objects.If neither the {@code payment_method} parameter nor the {@code source} parameter are * provided with {@code confirm=true}, this field will be automatically populated with {@code * customer.default_source} to improve the migration experience for users of the Charges API. We * recommend that you explicitly provide the {@code source} or {@code payment_method} parameter * going forward. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getSource() { return this.source; } /** * For non-card charges, you can use this value as the complete description that appears on your * customers’ statements. Must contain at least one letter, maximum 22 characters. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getStatementDescriptor() { return this.statementDescriptor; } /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getStatementDescriptorSuffix() { return this.statementDescriptorSuffix; } /** * The parameters used to automatically create a Transfer when the payment succeeds. For more * information, see the PaymentIntents use case for connected accounts. */ @java.lang.SuppressWarnings("all") @lombok.Generated public TransferData getTransferData() { return this.transferData; } /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts * for details. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getTransferGroup() { return this.transferGroup; } /** * Set to {@code true} only when using manual confirmation and the iOS or Android SDKs to handle * additional authentication steps. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Boolean getUseStripeSdk() { return this.useStripeSdk; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy