Class SetupIntent

    • Constructor Detail

      • SetupIntent

        public SetupIntent()
    • Method Detail

      • getApplication

        public java.lang.String getApplication()
        Get ID of expandable application object.
      • setApplication

        public void setApplication​(java.lang.String id)
      • getApplicationObject

        public Application getApplicationObject()
        Get expanded application.
      • setApplicationObject

        public void setApplicationObject​(Application expandableObject)
      • getCustomer

        public java.lang.String getCustomer()
        Get ID of expandable customer object.
      • setCustomer

        public void setCustomer​(java.lang.String id)
      • getCustomerObject

        public Customer getCustomerObject()
        Get expanded customer.
      • setCustomerObject

        public void setCustomerObject​(Customer expandableObject)
      • getLatestAttempt

        public java.lang.String getLatestAttempt()
        Get ID of expandable latestAttempt object.
      • setLatestAttempt

        public void setLatestAttempt​(java.lang.String id)
      • getLatestAttemptObject

        public SetupAttempt getLatestAttemptObject()
        Get expanded latestAttempt.
      • setLatestAttemptObject

        public void setLatestAttemptObject​(SetupAttempt expandableObject)
      • getMandate

        public java.lang.String getMandate()
        Get ID of expandable mandate object.
      • setMandate

        public void setMandate​(java.lang.String id)
      • getMandateObject

        public Mandate getMandateObject()
        Get expanded mandate.
      • setMandateObject

        public void setMandateObject​(Mandate expandableObject)
      • getOnBehalfOf

        public java.lang.String getOnBehalfOf()
        Get ID of expandable onBehalfOf object.
      • setOnBehalfOf

        public void setOnBehalfOf​(java.lang.String id)
      • getOnBehalfOfObject

        public Account getOnBehalfOfObject()
        Get expanded onBehalfOf.
      • setOnBehalfOfObject

        public void setOnBehalfOfObject​(Account expandableObject)
      • getPaymentMethod

        public java.lang.String getPaymentMethod()
        Get ID of expandable paymentMethod object.
      • setPaymentMethod

        public void setPaymentMethod​(java.lang.String id)
      • getPaymentMethodObject

        public PaymentMethod getPaymentMethodObject()
        Get expanded paymentMethod.
      • setPaymentMethodObject

        public void setPaymentMethodObject​(PaymentMethod expandableObject)
      • getSingleUseMandate

        public java.lang.String getSingleUseMandate()
        Get ID of expandable singleUseMandate object.
      • setSingleUseMandate

        public void setSingleUseMandate​(java.lang.String id)
      • getSingleUseMandateObject

        public Mandate getSingleUseMandateObject()
        Get expanded singleUseMandate.
      • setSingleUseMandateObject

        public void setSingleUseMandateObject​(Mandate expandableObject)
      • create

        public static SetupIntent create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                  throws StripeException
        Creates a SetupIntent object.

        After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.

        Throws:
        StripeException
      • create

        public static SetupIntent create​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                         RequestOptions options)
                                  throws StripeException
        Creates a SetupIntent object.

        After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.

        Throws:
        StripeException
      • retrieve

        public static SetupIntent retrieve​(java.lang.String intent)
                                    throws StripeException
        Retrieves the details of a SetupIntent that has previously been created.

        Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

        When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

        Throws:
        StripeException
      • retrieve

        public static SetupIntent retrieve​(java.lang.String intent,
                                           RequestOptions options)
                                    throws StripeException
        Retrieves the details of a SetupIntent that has previously been created.

        Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

        When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

        Throws:
        StripeException
      • retrieve

        public static SetupIntent retrieve​(java.lang.String intent,
                                           java.util.Map<java.lang.String,​java.lang.Object> params,
                                           RequestOptions options)
                                    throws StripeException
        Retrieves the details of a SetupIntent that has previously been created.

        Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

        When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

        Throws:
        StripeException
      • retrieve

        public static SetupIntent retrieve​(java.lang.String intent,
                                           SetupIntentRetrieveParams params,
                                           RequestOptions options)
                                    throws StripeException
        Retrieves the details of a SetupIntent that has previously been created.

        Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

        When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm()
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm​(RequestOptions options)
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                   RequestOptions options)
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm​(SetupIntentConfirmParams params)
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • confirm

        public SetupIntent confirm​(SetupIntentConfirmParams params,
                                   RequestOptions options)
                            throws StripeException
        Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

        If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

        Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

        Throws:
        StripeException
      • cancel

        public SetupIntent cancel()
                           throws StripeException
        A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action .

        Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

        Throws:
        StripeException
      • cancel

        public SetupIntent cancel​(RequestOptions options)
                           throws StripeException
        A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action .

        Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

        Throws:
        StripeException
      • cancel

        public SetupIntent cancel​(java.util.Map<java.lang.String,​java.lang.Object> params)
                           throws StripeException
        A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action .

        Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

        Throws:
        StripeException
      • cancel

        public SetupIntent cancel​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                  RequestOptions options)
                           throws StripeException
        A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action .

        Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

        Throws:
        StripeException
      • cancel

        public SetupIntent cancel​(SetupIntentCancelParams params)
                           throws StripeException
        A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action .

        Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

        Throws:
        StripeException
      • getCancellationReason

        public java.lang.String getCancellationReason()
        Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.
      • getClientSecret

        public java.lang.String getClientSecret()
        The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.

        The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

      • getCreated

        public java.lang.Long getCreated()
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • getDescription

        public java.lang.String getDescription()
        An arbitrary string attached to the object. Often useful for displaying to users.
      • getLastSetupError

        public StripeError getLastSetupError()
        The error encountered in the previous SetupIntent confirmation.
      • getLivemode

        public java.lang.Boolean getLivemode()
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • getNextAction

        public SetupIntent.NextAction getNextAction()
        If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to setup_intent.

      • getPaymentMethodTypes

        public java.util.List<java.lang.String> getPaymentMethodTypes()
        The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
      • getStatus

        public java.lang.String getStatus()
        Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
      • getUsage

        public java.lang.String getUsage()
        Indicates how the payment method is intended to be used in the future.

        Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.

      • setCancellationReason

        public void setCancellationReason​(java.lang.String cancellationReason)
        Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.
      • setClientSecret

        public void setClientSecret​(java.lang.String clientSecret)
        The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.

        The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

      • setCreated

        public void setCreated​(java.lang.Long created)
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • setDescription

        public void setDescription​(java.lang.String description)
        An arbitrary string attached to the object. Often useful for displaying to users.
      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • setLastSetupError

        public void setLastSetupError​(StripeError lastSetupError)
        The error encountered in the previous SetupIntent confirmation.
      • setLivemode

        public void setLivemode​(java.lang.Boolean livemode)
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • setMetadata

        public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        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.
      • setNextAction

        public void setNextAction​(SetupIntent.NextAction nextAction)
        If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
      • setObject

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to setup_intent.

      • setPaymentMethodOptions

        public void setPaymentMethodOptions​(SetupIntent.PaymentMethodOptions paymentMethodOptions)
        Payment-method-specific configuration for this SetupIntent.
      • setPaymentMethodTypes

        public void setPaymentMethodTypes​(java.util.List<java.lang.String> paymentMethodTypes)
        The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
      • setStatus

        public void setStatus​(java.lang.String status)
        Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
      • setUsage

        public void setUsage​(java.lang.String usage)
        Indicates how the payment method is intended to be used in the future.

        Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.String> getMetadata()
        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.
        Specified by:
        getMetadata in interface MetadataStore<SetupIntent>