Validate KYC Information
POST https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate Content-Type: application/json
This endpoint checks if the user’s provided information matches the information used during their Know-Your-Customer (KYC) verification.
It returns an object with a valid property that is true if the information matches and false otherwise.
A 404 error is returned if the KYC information for the user cannot be found. This does not indicate a validation failure.
Check the response body to determine if the KYC information is valid.
Reference: /api-reference/api-reference/withdraw/validate-kyc
Authentication
x-coinflow-auth-user-idheader (required) — The external identifier of the end user - see /api-reference/api-reference/authentication/get-session-keyAuthorizationheader (required) — The API key of the merchant - see /api-reference/api-reference/authentication/get-session-key
Request
Body (application/json)
firstName(string, required) — First name of the userlastName(string, required) — Last name of the userdob(string, optional) — Date of birth of the usercountry(string, optional) — Country of the user (ISO 3166-1 alpha-2)matchThreshold(integer, optional) — Matching Threshold The name comparison does not match exact strings, but instead is a fuzzy match so that nicknames or small misspellings don’t lead to false positives. Therefore, you are able to pass a threshold, 100 being most strict and 0 being least strict. If not passed the system will default to 90.
Response
200
Ok
invalidFields(list of string, required)valid(boolean, required)
Examples
Request
{
"firstName": "Emily",
"lastName": "Johnson"
}
Response
{
"invalidFields": [],
"valid": true
}
SDK Code
import requests
url = "https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate"
payload = {
"firstName": "Emily",
"lastName": "Johnson"
}
headers = {
"x-coinflow-auth-user-id": "<apiKey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = 'https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate';
const options = {
method: 'POST',
headers: {'x-coinflow-auth-user-id': '<apiKey>', 'Content-Type': 'application/json'},
body: '{"firstName":"Emily","lastName":"Johnson"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate"
payload := strings.NewReader("{\n \"firstName\": \"Emily\",\n \"lastName\": \"Johnson\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-coinflow-auth-user-id", "<apiKey>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-coinflow-auth-user-id"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Emily\",\n \"lastName\": \"Johnson\"\n}"
response = http.request(request)
puts response.read_body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate")
.header("x-coinflow-auth-user-id", "<apiKey>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Emily\",\n \"lastName\": \"Johnson\"\n}")
.asString();
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate', [
'body' => '{
"firstName": "Emily",
"lastName": "Johnson"
}',
'headers' => [
'Content-Type' => 'application/json',
'x-coinflow-auth-user-id' => '<apiKey>',
],
]);
echo $response->getBody();
using RestSharp;
var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-coinflow-auth-user-id", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"firstName\": \"Emily\",\n \"lastName\": \"Johnson\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import Foundation
let headers = [
"x-coinflow-auth-user-id": "<apiKey>",
"Content-Type": "application/json"
]
let parameters = [
"firstName": "Emily",
"lastName": "Johnson"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/kyc/validate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()