Integrations and ConnectorsConnectorsSetup GuidesKYC

Veriff Connector

Veriff is an identity verification platform for fraud prevention and Know Your Customer (KYC) compliance. The Veriff connector lets a Descope flow collect a selfie and an ID document from the user, send them to Veriff, and branch on Veriff's decision.

Unlike a redirect-based connector such as Incode, the user never leaves your flow. Your flow screens collect the images, and the connector actions upload them to a Veriff verification session.

Setting Up the Veriff Connector

To integrate the Veriff connector, follow the steps below:

1. Navigate to Connector

  • Visit the Connectors page in the Descope Console.
  • Select Veriff from the list of connectors.

2. Connector Setup

Enter the following information to configure the connector. You can find the API key and shared secret key in Veriff Station, under Integrations.

  • Connector name: Assign a custom name for your connector, especially useful when using multiple connectors originating from the same template.
  • (Optional) Connector description: A brief description of your connector's purpose.
  • API Key: Your Veriff API key.
  • Shared Secret Key: Your Veriff shared secret key.
  • (Optional) Base URL: The Veriff API base URL. It defaults to https://stationapi.veriff.com.

3. Test & Save

  • Validate your configuration by clicking the Test button and reviewing the Test Results section.
  • Complete the setup by selecting Create.

Implementing the Veriff Connector in Your Flow

1. Select or Create a Flow

  • Navigate to the Flows Page of the Descope console.
  • Select an existing flow or create a new one.

2. Integration

Click on the blue plus sign inside the flow builder and choose "Connector". The Veriff connector adds four actions. Create Verification Session saves the session ID to the flow, and the other actions use it automatically.

ActionWhat it does
Create Verification SessionStarts a Veriff verification session. You can pass details about the person, such as their name, date of birth, or ID number.
Upload SelfieUploads the image from a Take Photo screen component to the session.
Upload DocumentUploads one side of an ID document from an Upload Image screen component. Turn on Back of Document when the image is the back side.
Get Verification DecisionWaits for Veriff's decision on the submitted session and returns it. The decision is approved, declined, or resubmission_requested.

Both upload actions have a Submit for Verification option. Turning it on sends the session to Veriff for a decision, and a submitted session accepts no more images. You would turn it on for the last upload only.

This example flow collects a selfie and both sides of an ID document, then branches on the decision:

  1. Create Verification Session.
  2. A screen with a Take Photo component for the selfie and an Upload Image component for the front of the document.
  3. Upload Selfie, with Submit for Verification off.
  4. Upload Document, with Back of Document off and Submit for Verification off.
  5. A second screen with an Upload Image component for the back of the document.
  6. Upload Document, with Back of Document on and Submit for Verification on.
  7. Get Verification Decision.
  8. A condition on connectors.veriff_pollDecision.verification.status, with one branch for each decision. The key starts with the action's context key, so adjust it if you renamed that key.

The front and back of the document need separate screens. Every Upload Image component writes to the same flow value, so a second component on the same screen overwrites the first. For a single-sided document such as a passport, you can skip steps 5 and 6 and turn on Submit for Verification on the front upload instead.

3. Handle the Decision

Veriff doesn't answer the moment you upload the images. It analyzes the session first, and a session that goes to manual review can take much longer. That's why the decision has its own action: the upload actions finish quickly, and Get Verification Decision waits for the result.

Get Verification Decision checks for a decision until Veriff answers or the Polling Timeout runs out. The timeout is in seconds and defaults to 10.

Each connector action has a 30-second limit, and each check adds a short pause and an API call. Set the timeout to 20 or less, so the action always finishes in time.

If the timeout runs out first, the action fails with poll_reached_limit_time. That isn't a verification failure. It means Veriff hasn't decided yet, which is common with manual review.

You can route that error back to Get Verification Decision to keep waiting, or to a screen that asks the user to wait.

Keep the decision step after the uploads, as its own action. Don't add it to a step that already waits on something else, such as a magic link or another polling step. A connector call that runs past the time limit fails, and the flow may not be able to recover from it.

On approved, the flow continues. On declined, you can end the flow or show an error. On resubmission_requested, you can send the user back to collect new images.

Error Handling

Each action can fail with one of these errors. You can route an error to its own path in the flow.

ActionErrorMeaning
Create Verification Sessioncreate_session_failedVeriff didn't start the session.
Upload Selfie, Upload Documentupload_image_failedVeriff didn't accept the image.
Upload Selfie, Upload Documentsubmit_verification_failedVeriff didn't accept the session for a decision.
Get Verification Decisionget_decision_failedThe request for the decision failed.
Get Verification Decisionpoll_reached_limit_timeVeriff hadn't decided when the Polling Timeout ran out.
Get Verification Decisionverification_id_not_foundThe flow has no verification session ID. Check that Create Verification Session ran first.
Was this helpful?

On this page