Every time you make a call to verify a document, you need to include a country code. There are several reasons for this. One is that different countries may have different expected formats for the same fields. For example, you may be able to Verify a Passport and a DrivingLicence in China but only a DrivingLicence in Ireland.
If you're building out an HTML form for document verification from scratch, it is recommended to call Get Country Codes every time a user loads the page, rather than hard-coding the list into your application. This means that any updates to your account configurationconfiguration - When we refer to configuration we are talking about how you account has been set up by Trulioo’s team. will be reflected automatically, without incurring extra development cost. Get Country Codes returns a list of ISO 2 country codes, as shown:
[ "AU", "CA", "CN", "IN", "US", "GB", "IT", "MY", "NZ", "BE" ]
List of Countries
The GlobalGateway API supports a large number of datasources all over the world. If you would like more countries added to your account please contact Trulioo support.
Depending on the web framework you're using, you should be able to write some code and populate an HTML
<select>, with each
<option> being one of the country codes retrieved from GlobalGateway. For a good user experience, it is recommended to map each country code to the full country name (["AU":"Australia", "CA": "Canada",...]) as in the following:
<form> <select name="countries"> <option value="AU">Australia</option> <option value="CA">Canada</option> <option value="CN">China</option> . . . <option value="BE">Belgium</option> </select> <input type="submit" value="Submit"> </form>
The user can now pick a country from the list and, if necessary, click submit. Based on the selected country code you will be able to dynamically build a form for that user's country so that you can gather the data needed for a verification.
Updated over 1 year ago