Class SetupIntentCreateParams.Builder

  • Enclosing class:
    SetupIntentCreateParams

    public static class SetupIntentCreateParams.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setConfirm

        public SetupIntentCreateParams.Builder setConfirm​(java.lang.Boolean confirm)
        Set to true to attempt to confirm this SetupIntent immediately. This parameter defaults to false. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.
      • setCustomer

        public SetupIntentCreateParams.Builder setCustomer​(java.lang.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​(java.lang.String description)
        An arbitrary string attached to the object. Often useful for displaying to users.
      • addExpand

        public SetupIntentCreateParams.Builder addExpand​(java.lang.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​(java.util.List<java.lang.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​(java.lang.String key,
                                                             java.lang.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​(java.util.Map<java.lang.String,​java.lang.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.
      • putMetadata

        public SetupIntentCreateParams.Builder putMetadata​(java.lang.String key,
                                                           java.lang.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​(java.util.Map<java.lang.String,​java.lang.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​(java.lang.String onBehalfOf)
        The Stripe account ID for which this SetupIntent is created.
      • setPaymentMethod

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

        public SetupIntentCreateParams.Builder addAllPaymentMethodType​(java.util.List<java.lang.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​(java.lang.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. 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 confirm=true.