Check KYC Verification
curl --request GET \
--url https://api.example.com/api/kyc/:account \
--header 'API-KEY: <api-key>'import requests
url = "https://api.example.com/api/kyc/:account"
headers = {"API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-KEY': '<api-key>'}};
fetch('https://api.example.com/api/kyc/:account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/kyc/:account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/kyc/:account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/kyc/:account")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/kyc/:account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kyc_verify": true,
"money_limit": "8990",
"kyc_url": ""
}
{
"kyc_verify": false,
"money_limit": "600",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"kyc_verify": false,
"money_limit": "0",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Endpoints
Check KYC Verification
Check KYC verification status for a user account
GET
/
api
/
kyc
/
:account
Check KYC Verification
curl --request GET \
--url https://api.example.com/api/kyc/:account \
--header 'API-KEY: <api-key>'import requests
url = "https://api.example.com/api/kyc/:account"
headers = {"API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-KEY': '<api-key>'}};
fetch('https://api.example.com/api/kyc/:account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/kyc/:account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/kyc/:account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/kyc/:account")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/kyc/:account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kyc_verify": true,
"money_limit": "8990",
"kyc_url": ""
}
{
"kyc_verify": false,
"money_limit": "600",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"kyc_verify": false,
"money_limit": "0",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Overview
Check the KYC (Know Your Customer) verification status for a user account. This endpoint returns whether the user is verified, their money transfer limit, and a verification URL if needed.KYC Provider
CashQ uses Veriff as our Attested KYC provider for identity verification.Custom Veriff IntegrationIf you are using your own Veriff account, we can integrate with your Veriff API key to maintain a unified verification experience.
Alternative KYC ProvidersIf you need to use another KYC provider, please contact support@mycashq.com to discuss integration options.
Endpoint
GET /api/kyc/:account
Path Parameters
string
required
User account ID (phone number in E.164 format without the
+ sign)Format: [country code][subscriber number including area code]Example: 16175551212 for a US numberPhone Number FormatPhone numbers must be in E.164 international standard without the
+ sign:- ✅ Correct:
16175551212 - ❌ Incorrect:
+16175551212 - ❌ Incorrect:
6175551212(missing country code)
Authentication
string
required
Your CashQ API Key for authentication
Request Example
curl -X GET 'https://api.cashqbot.com/api/kyc/16175551212' \
-H 'API-KEY: your_api_key_here'
const phoneNumber = '16175551212';
const response = await fetch(
`https://api.cashqbot.com/api/kyc/${phoneNumber}`,
{
method: 'GET',
headers: {
'API-KEY': 'your_api_key_here'
}
}
);
const data = await response.json();
console.log(data);
import requests
phone_number = '16175551212'
response = requests.get(
f'https://api.cashqbot.com/api/kyc/{phone_number}',
headers={'API-KEY': 'your_api_key_here'}
)
data = response.json()
print(data)
<?php
$phoneNumber = '16175551212';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.cashqbot.com/api/kyc/{$phoneNumber}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'API-KEY: your_api_key_here'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
?>
Response
boolean
required
KYC verification status
true: User is verifiedfalse: User is not verified or has limited verification
string
required
Maximum amount the user can receive in a single transfer (in dollars)
- If
"0": User cannot receive money transfers - Otherwise: Maximum transfer amount allowed
string
required
URL to redirect user for KYC verification
- Empty string (
"") if user is fully verified - Contains verification URL if user needs to complete KYC
Response Examples
{
"kyc_verify": true,
"money_limit": "8990",
"kyc_url": ""
}
{
"kyc_verify": false,
"money_limit": "600",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"kyc_verify": false,
"money_limit": "0",
"kyc_url": "https://link.cashqbot.com/j2tf"
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Understanding KYC Status
Verified Users (kyc_verify: true)
- User has completed full KYC verification
- Can receive transfers up to their
money_limit - No additional verification needed
kyc_urlwill be empty
Unverified Users (kyc_verify: false)
- User has limited or no verification
- Can only receive transfers up to their
money_limit - Should be directed to
kyc_urlto complete verification - After verification, their
money_limitwill increase
Money Limit Interpretation
| money_limit | Meaning |
|---|---|
"0" | Cannot receive any transfers |
"600" | Can receive up to $600 per transfer |
"8990" | Can receive up to $8,990 per transfer |
Phone Number Formatting
Converting to E.164 Format
function formatPhoneNumber(phone, countryCode = '1') {
// Remove all non-digit characters
const digits = phone.replace(/\D/g, '');
// Add country code if not present
if (!digits.startsWith(countryCode)) {
return countryCode + digits;
}
return digits;
}
// Examples
formatPhoneNumber('(617) 555-1212', '1'); // Returns: 16175551212
formatPhoneNumber('+1-617-555-1212', '1'); // Returns: 16175551212
formatPhoneNumber('6175551212', '1'); // Returns: 16175551212
import re
def format_phone_number(phone, country_code='1'):
# Remove all non-digit characters
digits = re.sub(r'\D', '', phone)
# Add country code if not present
if not digits.startswith(country_code):
return country_code + digits
return digits
# Examples
format_phone_number('(617) 555-1212', '1') # Returns: 16175551212
format_phone_number('+1-617-555-1212', '1') # Returns: 16175551212
format_phone_number('6175551212', '1') # Returns: 16175551212
Error Responses
| Error Code | Description | Solution |
|---|---|---|
authentication_error | Invalid or missing API key | Verify your API key |
invalid_phone_number | Phone number format is incorrect | Use E.164 format without + |
account_not_found | Account doesn’t exist | Verify the phone number is correct |
internal_server_error | Server error occurred | Retry the request |
Best Practices
Always check before transfers
Always check before transfers
Check KYC status before initiating any transfer to avoid failures due to verification limits.
Cache KYC status appropriately
Cache KYC status appropriately
Cache KYC status for a reasonable time (e.g., 1 hour) but refresh before large transfers.
Provide clear user guidance
Provide clear user guidance
If a user needs verification, clearly explain why and provide the verification URL.
Validate phone numbers
Validate phone numbers
Validate and format phone numbers on your end before sending to the API.
Handle all limit scenarios
Handle all limit scenarios
Account for all cases: fully verified, partially verified, and unverified users.
Related Endpoints
Check Transfer
Validate transfer details including KYC requirements
Money Transfer
Execute a money transfer after KYC verification
