## Show verification modal Use `stripe.verifyIdentity` to display an [Identity](/identity.md) modal that securely collects verification information. This method returns a `Promise` which resolves with a result object. If this method fails, the result object will contain a localized error message in the `error.message` field. **Syntax:** `stripe.verifyIdentity(...)` - `clientSecret` (string) **required** The [client secret](/api/identity/verification_sessions/object.md#identity_verification_session_object-client_secret) of the `VerificationSession`. ### Show verification modal ```js var stripe = Stripe('{TEST_PUBLISHABLE_KEY}'); // Call your backend to create the VerificationSession fetch('/create-verification-session', { method: 'POST', }) .then(function(response) { return response.json(); }) .then(function(verificationSession) { return stripe.verifyIdentity(verificationSession.client_secret); }) .then(function(result) { // If `verifyIdentity` fails due to a browser or network // error, you should display the localized error message to your // customer using `error.message`. if (result.error) { alert(result.error.message); } }); ``` ```es_next const stripe = Stripe('{TEST_PUBLISHABLE_KEY}'); // Call your backend to create the VerificationSession const response = await fetch('/create-verification-session', { method: 'POST' }); const verificationSession = await response.json(); // When the user clicks on the button, open the Identity modal. const {error} = await stripe.verifyIdentity(verificationSession.client_secret); if (error) { // If `verifyIdentity` fails due to a browser or network // error, display the localized error message to your customer // using `error.message`. } ```