Identity

The easiest way to verify identities

Stripe Identity helps you confirm the identity of global users to prevent fraud, streamline risk operations, and increase trust and safety.

  • Capture IDs with a conversion-optimized verification flow

  • Verify authenticity of global ID documents

  • Match photo ID with selfies, and validate SSN

  • Access collected images, and extracted data from ID document

If you want to know more, please visit the Stripe Identityarrow-up-right home page. Or, if you're ready to get started, you can check the docs herearrow-up-right

circle-exclamation

Verify your users identity documents

There are four ways to implement Identity:

  • Modal — show a document upload modal inside your website.

  • Redirect — send your users to Stripe to upload their identity documents.

  • iOS Beta — show a document upload sheet inside your app.

  • Without code — manually create verifications in Dashboard and share a link with your users.

In this case we are going to use ngx-stripe to trigger the modal window within our Angular App. We need to create a verificación session in the server and then use the client secret in the front to trigger open the modal. Is a very similar to the Checkout flow.

To see more details on a full example, please check the official Stripe Docsarrow-up-right.

import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { switchMap } from 'rxjs/operators';

import { StripeService } from 'ngx-stripe';

@Component({
  selector: 'app-identity',
  templateUrl: './identity.component.html'
})
export class IdentityComponent {
  constructor(
    private http: HttpClient,
    private stripeService: StripeService
  ) {}

  verify() {
    // Check the server.js tab to see an example implementation
    this.https.post('/create-verification-session', {})
      .pipe(
        switchMap(session => {
          // Show the verification modal.
          return this.stripeService.verifyIdentity(session.clientSecret)
        })
      )
      .subscribe(result => {
        // If `verifyIdentity` fails, you should display the localized
        // error message to your user using `error.message`.
        if (result.error) {
          alert(result.error.message);
        }
      });
  }
}

Verify your users identity using redirect

As discuss in the previous section, there is an alternative flow using redirect instead of a modal window. In this case you don't need this library or to bootstrap Stripe in the front at all.

All you need is to create a Verification Session in the server and pass the redirect url to the front. From there, you can simply redirect the user to that url.

Again, to see more details on a full example, please check the official Stripe Docsarrow-up-right.

Last updated