Skip to main content

Cross-Border KYC in Go: Integrating Didit's Database Validation

Mastering cross-border KYC is crucial for global expansion, but navigating diverse data sources and compliance can be complex. This guide explores how Didit's Database Validation endpoint simplifies this by providing a unified.

Cross-Border KYC in Go: Integrating Didit's Database Validation

Contents

In this guide

Jump to the part you need.

Simplified Global KYCDidit's Database Validation offers a streamlined API to perform identity verification against official government databases across many countries, simplifying cross-border compliance challenges.

Configurable Risk ManagementLeverage Didit's flexible settings to define actions for partial or no matches, allowing for automated review or decline flows tailored to your risk appetite.

Go-Native IntegrationEasily integrate Didit's robust identity verification capabilities into your Go applications, enabling efficient and scalable KYC processes.

Didit's AdvantageDidit provides Core KYC and a modular, AI-native platform, allowing businesses to build custom verification workflows without setup fees, ensuring global coverage and fraud prevention.

The Challenge of Cross-Border KYC

Expanding your business globally opens up vast opportunities, but it also introduces significant hurdles, particularly in the realm of Know Your Customer (KYC) and Anti-Money Laundering (AML) compliance. Each country has its own unique regulatory landscape, data sources, and identity verification standards. Manually integrating with disparate national databases, understanding their specific data requirements, and interpreting varied responses can be a monumental task for any development team. This complexity often leads to slower customer onboarding, increased operational costs, and a higher risk of non-compliance and fraud.

For developers building applications in Go, the challenge extends to finding robust, reliable, and easy-to-integrate solutions that can handle the nuances of international identity verification. Traditional approaches often involve complex, country-specific API integrations, leading to a fragmented and difficult-to-maintain system. This is where a unified, API-driven solution like Didit's Database Validation becomes invaluable, abstracting away much of the underlying complexity.

Understanding Didit's Database Validation

Didit's Database Validation is a powerful tool designed to cross-reference user information against trusted, authoritative government and commercial data sources. This process is critical for confirming an individual's identity, ensuring compliance with local regulations, and effectively mitigating identity fraud. Unlike solutions that rely solely on document verification, database validation provides an additional layer of security by checking against official records.

The core of this service is its ability to provide a clear validation report, detailing the outcome of the check. This includes a status (Approved, Declined, or In Review), a match_type (full_match, partial_match, or no_match), and specific validations for each data point like full name, date of birth, or identification number. Didit supports a growing list of countries, offering both 1x1 and 2x2 matching methods, where 1x1 typically validates a single piece of identifying information and 2x2 validates two, against official registries. For instance, in Brazil, a tax number is required, while in Chile, a personal number is used. This flexibility ensures that businesses can meet diverse global KYC requirements through a single, unified API.

Integrating Database Validation in Go

Integrating Didit's Database Validation into a Go application is straightforward, thanks to its clean API design. The process involves making an HTTP POST request to the validation endpoint with the user's data. Let's outline a simplified example of how you might structure this in Go:

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

type DiditValidationRequest struct {
	IssuingState string `json:"issuing_state"`
	ScreenedData struct {
		FirstName   string `json:"first_name"`
		LastName    string `json:"last_name"`
		TaxNumber   string `json:"tax_number,omitempty"`
		DateOfBirth string `json:"date_of_birth,omitempty"`
	} `json:"screened_data"`
}

type DiditValidationResponse struct {
	DatabaseValidation struct {
		Status    string `json:"status"`
		MatchType string `json:"match_type"`
		Validations struct {
			FullName           string `json:"full_name,omitempty"`
			DateOfBirth        string `json:"date_of_birth,omitempty"`
			IdentificationNumber string `json:"identification_number,omitempty"`
		} `json:"validations"`
	} `json:"database_validation"`
}

func main() {
	// Replace with your actual API Key
	apiKey := "YOUR_DIDIT_API_KEY"
	apiEndpoint := "https://api.didit.me/v1/database-validation" // Example endpoint

	requestBody := DiditValidationRequest{
		IssuingState: "BRA", // Example for Brazil
		ScreenedData: struct {
			FirstName   string `json:"first_name"`
			LastName    string `json:"last_name"`
			TaxNumber   string `json:"tax_number,omitempty"`
			DateOfBirth string `json:"date_of_birth,omitempty"`
		}{
			FirstName:   "ANTONIO RAIMUNDO",
			LastName:    "GUIMARAES DE LIMA",
			TaxNumber:   "00147177278",
			DateOfBirth: "1988-03-18",
		},
	}

	jsonBody, err := json.Marshal(requestBody)
	if err != nil {
		fmt.Println("Error marshaling request body:", err)
		return
	}

	req, err := http.NewRequest("POST", apiEndpoint, bytes.NewBuffer(jsonBody))
	if err != nil {
		fmt.Println("Error creating request:", err)
		return
	}

	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer "+apiKey)

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		fmt.Println("Error sending request:", err)
		return
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println("Error reading response body:", err)
		return
	}

	var diditResponse DiditValidationResponse
	err = json.Unmarshal(body, &diditResponse)
	if err != nil {
		fmt.Println("Error unmarshaling response:", err)
		return
	}

	fmt.Printf("Validation Status: %s\n", diditResponse.DatabaseValidation.Status)
	fmt.Printf("Match Type: %s\n", diditResponse.DatabaseValidation.MatchType)
	fmt.Printf("Full Name Validation: %s\n", diditResponse.DatabaseValidation.Validations.FullName)
}

This Go snippet demonstrates how to construct a request, include the necessary headers (like your API key for authentication), and parse the JSON response from Didit. The IssuingState field is crucial for specifying the country for validation, and ScreenedData contains the user's details to be checked against the database. Depending on the country, different fields will be required or optional, as detailed in Didit's documentation.

Handling Validation Outcomes and Warnings

A key advantage of Didit's Database Validation is its robust handling of various validation outcomes, including partial matches and no matches. These scenarios are common in cross-border KYC due to data entry errors, name variations, or differences in how data is stored across various national databases. Didit provides clear warning tags such as DATABASE_VALIDATION_PARTIAL_MATCH and DATABASE_VALIDATION_NO_MATCH.

Didit's platform allows you to configure specific actions for these warning types. For instance, a partial_match might automatically set a session to "In Review" for manual assessment by your compliance team, while a no_match could automatically decline the transaction or flag it for further investigation. This configurable workflow is essential for balancing user experience with stringent compliance requirements. Furthermore, if a required field is missing (COULD_NOT_PERFORM_DATABASE_VALIDATION), Didit's system can automatically re-trigger the check once the necessary data is provided, minimizing manual intervention and ensuring smoother processing.

The Importance of Database Validation in Modern KYC

In today's digital landscape, relying solely on document-based verification (like ID Verification through OCR or MRZ scanning) is often insufficient for comprehensive KYC. While invaluable for verifying the authenticity of a physical document, it doesn't always confirm that the person presenting the document is indeed the legitimate holder whose data is in official government records. Database validation bridges this gap by cross-referencing provided data with authoritative sources, adding an essential layer of trust and security.

This combined approach significantly enhances fraud prevention, especially against synthetic identity fraud or cases where stolen legitimate documents are used. By integrating Didit's Database Validation, businesses can achieve higher assurance levels for compliance, reduce the risk of financial crime, and build a more resilient identity verification framework. It complements other Didit products like AML Screening & Monitoring for a holistic compliance solution.

How Didit Helps

Didit stands out as the premier AI-native, developer-first identity platform for solving the complexities of cross-border KYC. Our Database Validation product is a core component of our modular architecture, designed to be plug-and-play into any existing system. We offer Core KYC with pay-per-use pricing, allowing businesses to start with essential identity verification without upfront costs or setup fees, only paying per check.

Didit's platform is built to be globally compliant by design, offering extensive coverage for database validation across numerous countries. Our AI-native approach ensures high accuracy and efficiency, automating verification processes and reducing the need for manual review. With clean APIs, an instant sandbox, and comprehensive public documentation, developers can quickly integrate and orchestrate complex identity workflows. Whether you need to verify an individual's identity against government databases, screen against watchlists with AML Screening & Monitoring, or verify addresses with Proof of Address, Didit provides the tools to automate trust and scale your operations with confidence.

Ready to Get Started?

Ready to see Didit in action? Get a free demo today.

Start verifying identities for free with Didit's free tier.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Blog questions

Who writes the Didit blog?
The Didit team. Guides reviewed by Alberto Rosas, co-founder and CEO, carry his byline. The rest are published as Didit.
Which topics does the blog cover?
Eight topics: ID verification, business verification (KYB), AML, sanctions and compliance, fraud prevention, transaction monitoring and crypto, country guides, agents and developers, and product updates.
Is the blog available in my language?
Yes, in 15 languages: English, Spanish, French, German, Brazilian and European Portuguese, Catalan, Russian, Arabic, Chinese, Japanese, Hindi, Indonesian, Korean and Swahili. Not every post is translated, so each language shows the posts it has.
Where do I find product updates?
In the changelog at /changelog/ and under the Product updates topic.
Are these posts legal advice?
No. Regulation posts explain rules; your legal team decides how they apply.
How do I find posts on one topic?
Open one of the eight topics, or search the blog.
Are posts dated?
Yes. Every post shows when it was published and when it was last updated.
Do posts link to the docs?
Developer posts link to the matching page on docs.didit.me and to the API reference.
Is the blog the same as the docs?
No. The blog explains rules, markets and product changes for a general reader, while docs.didit.me holds the integration guides and the API reference. Developer posts link the matching docs page and the API reference they describe.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.