Class VerificationSession

    • Constructor Detail

      • VerificationSession

        public VerificationSession()
    • Method Detail

      • getLastVerificationReport

        public java.lang.String getLastVerificationReport()
        Get ID of expandable lastVerificationReport object.
      • setLastVerificationReport

        public void setLastVerificationReport​(java.lang.String id)
      • getLastVerificationReportObject

        public VerificationReport getLastVerificationReportObject()
        Get expanded lastVerificationReport.
      • setLastVerificationReportObject

        public void setLastVerificationReportObject​(VerificationReport expandableObject)
      • create

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

        After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

        If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

        Related guide: Verify your users’ identity documents.

        Throws:
        StripeException
      • create

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

        After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

        If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

        Related guide: Verify your users’ identity documents.

        Throws:
        StripeException
      • retrieve

        public static VerificationSession retrieve​(java.lang.String session)
                                            throws StripeException
        Retrieves the details of a VerificationSession that was previously created.

        When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.

        Throws:
        StripeException
      • retrieve

        public static VerificationSession retrieve​(java.lang.String session,
                                                   RequestOptions options)
                                            throws StripeException
        Retrieves the details of a VerificationSession that was previously created.

        When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.

        Throws:
        StripeException
      • retrieve

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

        When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.

        Throws:
        StripeException
      • cancel

        public VerificationSession cancel​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                   throws StripeException
        A VerificationSession object can be canceled when it is in requires_input status.

        Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact()
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact​(RequestOptions options)
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                          RequestOptions options)
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact​(VerificationSessionRedactParams params)
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • redact

        public VerificationSession redact​(VerificationSessionRedactParams params,
                                          RequestOptions options)
                                   throws StripeException
        Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

        A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it.

        The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing ; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

        Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

        Learn more.

        Throws:
        StripeException
      • getClientSecret

        public java.lang.String getClientSecret()
        The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more.
      • getCreated

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

        public VerificationSession.LastError getLastError()
        If present, this property tells you the last error encountered when processing the verification.
      • 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.
      • getObject

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

        Equal to identity.verification_session.

      • getRedaction

        public VerificationSession.Redaction getRedaction()
        Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
      • getType

        public java.lang.String getType()
        The type of verification check to be performed.

        One of document, or id_number.

      • getUrl

        public java.lang.String getUrl()
        The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 24 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe.
      • setClientSecret

        public void setClientSecret​(java.lang.String clientSecret)
        The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more.
      • setCreated

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

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

        public void setLastError​(VerificationSession.LastError lastError)
        If present, this property tells you the last error encountered when processing the verification.
      • 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.
      • 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 identity.verification_session.

      • setRedaction

        public void setRedaction​(VerificationSession.Redaction redaction)
        Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
      • setType

        public void setType​(java.lang.String type)
        The type of verification check to be performed.

        One of document, or id_number.

      • setUrl

        public void setUrl​(java.lang.String url)
        The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 24 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe.
      • 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<VerificationSession>