Class SetupIntentCreateParams.Builder

java.lang.Object
com.stripe.param.SetupIntentCreateParams.Builder
Enclosing class:
SetupIntentCreateParams

public static class SetupIntentCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public SetupIntentCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setAttachToSelf

      public SetupIntentCreateParams.Builder setAttachToSelf(Boolean attachToSelf)
      If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.

      It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

    • setAutomaticPaymentMethods

      public SetupIntentCreateParams.Builder setAutomaticPaymentMethods(SetupIntentCreateParams.AutomaticPaymentMethods automaticPaymentMethods)
      When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
    • setConfirm

      public SetupIntentCreateParams.Builder setConfirm(Boolean confirm)
      Set to true to attempt to confirm this SetupIntent immediately. This parameter defaults to false. If a card is the attached payment method, you can provide a return_url in case further authentication is necessary.
    • setConfirmationToken

      public SetupIntentCreateParams.Builder setConfirmationToken(String confirmationToken)
      ID of the ConfirmationToken used to confirm this SetupIntent.

      If the provided ConfirmationToken contains properties that are also being provided in this request, such as payment_method, then the values in this request will take precedence.

    • setCustomer

      public SetupIntentCreateParams.Builder setCustomer(String customer)
      ID of the Customer this SetupIntent belongs to, if one exists.

      If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.

    • setDescription

      public SetupIntentCreateParams.Builder setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • addExpand

      public SetupIntentCreateParams.Builder addExpand(String element)
      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 SetupIntentCreateParams.expand for the field documentation.
    • addAllExpand

      public SetupIntentCreateParams.Builder addAllExpand(List<String> elements)
      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 SetupIntentCreateParams.expand for the field documentation.
    • putExtraParam

      public SetupIntentCreateParams.Builder putExtraParam(String key, Object value)
      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 SetupIntentCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public SetupIntentCreateParams.Builder putAllExtraParam(Map<String,Object> map)
      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 SetupIntentCreateParams.extraParams for the field documentation.
    • addFlowDirection

      Add an element to `flowDirections` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See SetupIntentCreateParams.flowDirections for the field documentation.
    • addAllFlowDirection

      Add all elements to `flowDirections` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See SetupIntentCreateParams.flowDirections for the field documentation.
    • setMandateData

      This hash contains details about the mandate to create. This parameter can only be used with confirm=true.
    • setMandateData

      public SetupIntentCreateParams.Builder setMandateData(EmptyParam mandateData)
      This hash contains details about the mandate to create. This parameter can only be used with confirm=true.
    • putMetadata

      public SetupIntentCreateParams.Builder putMetadata(String key, String value)
      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 SetupIntentCreateParams.metadata for the field documentation.
    • putAllMetadata

      public SetupIntentCreateParams.Builder putAllMetadata(Map<String,String> map)
      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 SetupIntentCreateParams.metadata for the field documentation.
    • setOnBehalfOf

      public SetupIntentCreateParams.Builder setOnBehalfOf(String onBehalfOf)
      The Stripe account ID created for this SetupIntent.
    • setPaymentMethod

      public SetupIntentCreateParams.Builder setPaymentMethod(String paymentMethod)
      ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
    • setPaymentMethodConfiguration

      public SetupIntentCreateParams.Builder setPaymentMethodConfiguration(String paymentMethodConfiguration)
      The ID of the payment method configuration to use with this SetupIntent.
    • setPaymentMethodData

      public SetupIntentCreateParams.Builder setPaymentMethodData(SetupIntentCreateParams.PaymentMethodData paymentMethodData)
      When included, this hash creates a PaymentMethod that is set as the payment_method value in the SetupIntent.
    • setPaymentMethodOptions

      public SetupIntentCreateParams.Builder setPaymentMethodOptions(SetupIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
      Payment method-specific configuration for this SetupIntent.
    • addPaymentMethodType

      public SetupIntentCreateParams.Builder addPaymentMethodType(String element)
      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 SetupIntentCreateParams.paymentMethodTypes for the field documentation.
    • addAllPaymentMethodType

      public SetupIntentCreateParams.Builder addAllPaymentMethodType(List<String> elements)
      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 SetupIntentCreateParams.paymentMethodTypes for the field documentation.
    • setReturnUrl

      public SetupIntentCreateParams.Builder setReturnUrl(String returnUrl)
      The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with confirm=true.
    • setSingleUse

      If you populate this hash, this SetupIntent generates a single_use mandate after successful completion.
    • setUsage

      Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to off_session.
    • setUseStripeSdk

      public SetupIntentCreateParams.Builder setUseStripeSdk(Boolean useStripeSdk)
      Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.