LogoLogo
  • API Documentation
  • Authentication
  • Testing
  • Contact Support
  • System Status
  • VX
    • API Methods
      • Create Session
      • Get Session Status
      • Get Session Result
      • Webhook
    • iFrame Integration
  • Agematch
    • United States
    • United States (DMV)
    • International
    • With KBA Quiz
    • Selfie Age Estimation
  • IDMATCH
    • United States
      • With KBA Escalation
      • KYC/CIP Compliance
      • COPPA Compliance
    • International
  • idmatch+
    • United States
  • IDMATCH+PREDICT
    • Fraud Score
  • phonematch
    • Verification and Validation
      • Smart 2FA
      • Phone Verification
      • Phone Validation
    • One Time Passwords
      • SMS
      • Call
    • Message Delivery
      • Dialer
  • emailmatch
    • Email Validation
  • dcams
    • Document Capture and Management Services
      • Scanning Basic
      • Scanning Enhanced
      • Manual Review
      • Storage
        • Create or Update a Customer
        • Get Customer Status
        • Get Customer Document Images
        • Update Customer Status
      • iFrame
        • Canned Responses
        • Create Token
        • View Callback
        • User Status
        • Generate Link
      • Swift SDK
      • Android SDK
  • Bouncer
    • Overview
    • Bouncer as an add-on
  • V-PIN
    • Overview
    • V-PIN as an add-on
    • V-PIN Stand Alone
  • Service Coverage
    • Data Coverage
  • Testing
    • Test Cases
    • Answers to KBA Questions
  • Reporting
    • Audit
  • API Processing Errors
    • Error Returns
  • Knowledge Base
    • Best Practices
    • Understanding Veratad Services
  • IDMax
    • IDMax Button Creator SDK
Powered by GitBook
On this page
  • Embedding the Verification iFrame
  • iFrame Example
  • Listening for Post Messages
  • Post Message Data Structure
  • Sample Implementation
  • Response Values
  1. VX

iFrame Integration

Embedding the Verification iFrame

You can optionally embed the verification link returned in the response within an iFrame on your website. The iFrame will post messages to the parent window based on specific events that occur during the verification process.

iFrame Example

<iframe
  src="https://fe.dcams.app/d2568a05-47a2-4ec7-b3e3-c5bd194461a7"
  width="420"
  height="670"
  style="overflow: hidden; border: none;"
  allow="camera"
  allowfullscreen
  <!-- Make sure to set the allow properly in case one of your verification components needs access -->
></iframe>

When displaying this iFrame on a mobile device, set both width and height to 100% and include the allowfullscreen attribute so the verification experience can expand properly.

Listening for Post Messages

To listen for events sent from the iFrame to the parent window, you can add an event listener for the message event.

Post Message Data Structure

The post message from the iFrame to the parent window will have the following structure:

{
  "messageType": "payload",
  "value": {
    "event": "COMPLETE",
    "app": "PHONEMATCH",
    "error": "NONE"
  }
}

Sample Implementation

// Add an event listener to handle incoming messages
window.addEventListener("message", (event) => {
  // Ensure the message is from a trusted origin
  if (event.origin !== "https://vx-fe.dcams.app") return;

  // Check if the messageType is 'payload'
  if (event.data.messageType === "payload") {
    const payload = event.data.value;

    // Handle the payload as needed
    console.log("Received event:", payload.event);
    console.log("App involved:", payload.app);
    console.log("Error status:", payload.error);

    // Example: Take action based on the event type
    if (payload.event === "COMPLETE") {
      // Do something when the process is complete
    } else if (payload.event === "NEXT") {
      // Record the navigation to the next step
    }
  }
});

Response Values

Key

Possible Values

Definition

event

"NEXT"

Indicates that the application is navigating to the next step.

"CLOSED"

Indicates that the user has clicked to close the current journey.

"ERROR"

Indicates an error occurred during the journey.

"COMPLETE"

Indicates that the journey has completed.

"COMPLETE AND IN REVIEW"

Indicates that the user's journey is complete, but the last step, an ID document auto scan, failed. The agent review app is now active, and the ID is in the review queue.

app

"PHONEMATCH"

Represents the app responsible for matching phone numbers.

"DCAMS_AUTO_SCAN"

Represents the app for automated document scanning within the DCAMS suite.

"IDMATCH_KBA"

Represents the app responsible for Knowledge-Based Authentication (KBA) within the IDMATCH suite.

"DCAMS_AUTO_WITH_SELFIE"

Represents the app for document scanning with a selfie verification within the DCAMS suite.

"DCAMS_AUTO_WITH_EXPRESS"

Represents the express version of the document scanning app within the DCAMS suite.

"AGEMATCH_ESTIMATE"

Represents the app for age estimation within the AGEMATCH suite.

"IDMATCH_COPPA"

Represents the app for verifying compliance with COPPA (Children's Online Privacy Protection Act) within the IDMATCH suite.

"AGEMATCH"

Represents the main app within the AGEMATCH suite responsible for age matching.

"IDMAX_CLEAR"

Represents the CLEAR verification app within the IDMAX suite.

"IDMAX_MDL_LA"

Represents the app for LA Wallet (Mobile Driver's License) verification within the IDMAX suite.

"IDMAX_ONEID"

Represents the ONEID verification app within the IDMAX suite.

"IDMAX_DIGILOCKER"

Represents the DIGILOCKER verification app within the IDMAX suite.

"IDMAX_PLAID"

Represents the app for financial account verification using Plaid within the IDMAX suite.

"IDMAX_YOTI"

Represents the YOTI verification app within the IDMAX suite.

undefined

Represents a scenario where the current route step does not define an app, possibly due to an incomplete route sequence or an error.

error

"NONE"

Indicates that no error occurred during the process. This is the default value.

"ALREADY_DONE"

Indicates that the process has already been completed, and an attempt was made to repeat it, resulting in an error.

"PENDING"

Indictes the user's last session is still in progress becasue of a manual review

"VELOCITY"

Indicates the user has violated the amount of attempts within a 24 hour period for your settings profile

"ALREADY_VERIFIED"

Indicates the user has already been verified and your block setting is true in your settings profile

PreviousWebhookNextUnited States

Last updated 1 day ago