Search…
Hosted Integration (Web Link)
This document explains how to integrate the verification flow outside of your web application

General

In case you'd rather have the verification process handled outside of your application, you can send your users to an URL, that is managed directly on Passbase.
You can get your own customizable organization slug. e.g. https://verify.passbase.com/YOURCOMPANY
1
https://verify.passbase.com/:organization_slug
Copied!
An example of this solution is this Passbase Demo.
If you haven't done so before, head towards app.passbase.com and turn on 'Enable V2 for your verification link'.

Prefilling Data: User Email & Country

In order to prefill the email of a verification & skip this step or to preselect a country from the dropdown, you can pass a base64 encoded parameter string at the end of the request like below.
1
// Your Link
2
https://verify.passbase.com/:organization_slug
3
4
// Your link including an encoded string for customizations
5
https://verify.passbase.com/:organization_slug?p={BASE64_ENCODED_STRING}
Copied!
The encoded object should be a JSON object consisting of the following (optional) key-value pairs:
Key
Value
prefill_attributes
email: Populate this field if you already know your users' email address to speed up the verification flow.
country: An ISO-3166 compliant country code. For the ID document country selection screen, this will pre-select the country of the ID document in the dropdown menu for your users

Tool: Passbase Link Encoder

If you don't want to build this functionality into your backend, you can also use this tool to encode your hosted link with a user email online: Passbase Link Encoder
The code for this project is on Github here.

Example for Your Own Application

Below is an example where we prefill an user's email and set the country for the top document of the id document list to Germany:
JavaScript
Python
Ruby
PHP
1
const prefillAttributes = {
2
prefill_attributes: {
3
4
country: "de"
5
}
6
}
7
const objJsonStr = JSON.stringify(prefillAttributes);
8
const objJsonB64 = Buffer.from(objJsonStr).toString("base64");
9
10
// Your Link
11
const link = "https://verify.passbase.com/" + "YOUR_SLUG" + "/?p=" + objJsonB64
12
13
// Result:
14
// https://verify.passbase.com/YOUR_SLUG/?p=eyJwcmVmaWxsX2F0dHJpYnV0ZXMiOnsiZW1haWwiOiJ1c2VyQGVtYWlsLmRlIiwiY291bnRyeSI6ImRlIn19
Copied!
1
import json
2
import base64
3
4
yourCompanySlug = "mathias"
5
yourPassbaseLink = "https://verify.passbase.com/" + yourCompanySlug
6
7
prefillAttributes = {
8
"prefill_attributes": {
9
"email": "[email protected]",
10
"country": "de"
11
}
12
}
13
jsonString = json.dumps(prefillAttributes)
14
encoded = base64.b64encode(jsonString.encode('utf-8'))
15
encodedStr = str(encoded, "utf-8")
16
link = yourPassbaseLink + '?p=' + encodedStr
17
18
# Result
19
# https://verify.passbase.com/YOUR_SLUG?p=eyJwcmVmaWxsX2F0dHJpYnV0ZXMiOiB7ImVtYWlsIjogInVzZXJAZW1haWwuZGUiLCAiY291bnRyeSI6ICJkZSJ9fQ==
Copied!
1
require "base64"
2
require 'json'
3
4
yourCompanySlug = "mathias"
5
yourPassbaseLink = "https://verify.passbase.com/" + yourCompanySlug
6
7
preFillAttributes = {'prefill_attributes' => {
8
'email' => '[email protected]',
9
'country' => 'de'
10
}}
11
encoded = Base64.strict_encode64(preFillAttributes.to_json)
12
link = yourPassbaseLink + "?p=" + encoded
13
14
# Result
15
# https://verify.passbase.com/YOUR_SLUG/?p=eyJwcmVmaWxsX2F0dHJpYnV0ZXMiOnsiZW1haWwiOiJ1c2VyQGVtYWlsLmRlIiwiY291bnRyeSI6ImRlIn19
Copied!
1
$slug = "mathias";
2
$yourPassbaseLink = "https://verify.passbase.com/".$slug;
3
4
$hash_map = array(
5
'prefill_attributes' => array(
6
'email' => '[email protected]',
7
'country' => 'de'
8
),
9
);
10
11
$encodedAttributes = base64_encode(json_encode($hash_map));
12
$encodedLink = $yourPassbaseLink."?p=".$encodedAttributes;
13
14
# Result
15
# https://verify.passbase.com/YOUR_SLUG/?p=eyJwcmVmaWxsX2F0dHJpYnV0ZXMiOnsiZW1haWwiOiJ1c2VyQGVtYWlsLmRlIiwiY291bnRyeSI6ImRlIn19
Copied!
Last modified 9mo ago