Verix

Developer Hub

Welcome to the Verix developer hub. You'll find comprehensive guides and documentation to help you start working with Verix as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

We recommend building an iOS integrations with webviews & redirect URL callbacks. We'll illustrate how to accomplish this below.

Configure Redirect URLs

You will need to configure redirect URLs to be notified of success and cancel events.

Email our support team the success and cancel redirect URLs you want to use on iOS.

Load Webview

No Prefilled Input Fields

if let url = URL(string: "https://connect.verixapi.com/connect/ios?client_id=YOUR_CLIENT_ID&environment=sandbox") {
  webView.load(URLRequest(url: url))
}

If you're not prefilling any input fields, you can load Connect directly using a GET request as displayed above.

Prefilled Input Fields

let url = Bundle.main.url(forResource: "index", withExtension: "html")!
webView.loadFileURL(url, allowingReadAccessTo: url)
let request = URLRequest(url: url)
webView.load(request)
<!DOCTYPE html>
<html>
  <head>
    <title>My Verix iOS Integration</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script>
      const load = () => {
        var form = document.getElementById("main");
        form.submit();
      }
      window.onload = load;
    </script>
  </head>
  <body>
    <form id="main" method="POST" action="https://connect.verixapi.com/connect/ios/">
      <input type="hidden" name="clientId" value="YOUR_CLIENT_ID">
      <input type="hidden" name="environment" value="sandbox">
      <input type="hidden" name="optionalData[name][first]" value="Homer">
      <input type="hidden" name="optionalData[name][last]" value="Simpson">
      <input type="hidden" name="optionalData[email]" value="[email protected]">
      <input type="hidden" name="optionalData[birthdate][month]" value="5">
      <input type="hidden" name="optionalData[birthdate][day]" value="12">
      <input type="hidden" name="optionalData[birthdate][year]" value="1956">
      <input type="hidden" name="optionalData[mobileNumber]" value="9395550113">
      <input type="hidden" name="optionalData[socialSecurityNumber]" value="435420097">
      <input type="hidden" name="optionalData[filingAddress][address]" value="742 Evergreen Terrace">
      <input type="hidden" name="optionalData[filingAddress][address2]" value="Unit 1">
      <input type="hidden" name="optionalData[filingAddress][city]" value="Springfield">
      <input type="hidden" name="optionalData[filingAddress][state]" value="OR">
      <input type="hidden" name="optionalData[filingAddress][zip]" value="97403">
      <input type="hidden" name="optionalData[filingStatus]" value="Married Filing Jointly">
    </form>
  </body>
</html>

If you're prefilling input fields, you need to load Connect via a POST request, so we can securely receive the user's PII.

We demonstrate how to do this in the sample code above. You can load a local HTML page in a webview. The local HTML page includes a form with the user's PII. This form automatically gets submitted once the window loads.

Listen for Redirects

func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
  if let url = navigationAction.request.url {
    if url.scheme == "myverixapp" {
      if url.path == "/success" {
        let queryItems = URLComponents(string: url.absoluteString)?.queryItems
        let code = queryItems?.filter({$0.name == "code"}).first
        let codeValue = code?.value!
        print ("User success! Authorization code is " + codeValue!)       
      } else if url.path == "/cancel" {
        print ("User cancelled")
      }
    }
  }
  decisionHandler(.allow)
}

Finally you listen for callbacks via URL redirections. If the redirection URL matches your configured redirection URL, you can then write custom code to handle this callback. We'll pass the results of a callback in the URL parameters.

Updated about a month ago

iOS


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.