Card KYC Start cardholder KYC verification
Start cardholder KYC verification
Starts hosted verification for a cardholder, with a liveness check, and returns a link. The link expires after one hour.
Api-Key
Starts hosted verification for a cardholder, with a liveness check, and returns a link. The link expires after one hour.
Do not call this for a customer whose KYC is already completed. It sets the customer's KYC back to pending until the new review ends, which can block accounts and cards. To get only a liveness check, use the link that feature activation returns.
Every error on this route is HTTP 400.
Headers
NameDescription
Idempotency-KeyRequired for POST requests. 1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours returns the first response.
Body parameters
NameDescription
customer_idID of the customer to verify. Other fields are ignored.
Response
Returns 200 OK. Link issued
NameDescription
dataShow 6 child attributesobject
statusAlways success.
Possible values: success
review_statusAlways pending.
Possible values: pending
web_urlHosted verification link. It expires after one hour.
applicant_idVerification applicant ID. Returned on the first start only.
kyc_levelVerification level,
basic. An empty string when a started verification is restarted.external_user_idThe customer ID. An empty string when a started verification is restarted.
errorErrors
| Status | Meaning |
|---|---|
| 200 | Link issued |
| 400 | Any error, including an unknown customer and a start already in progress. |
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/risk/start-kyc' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: card-kyc-b84d9a52-attempt-1' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "d2581d3c-7c55-4607-9717-546694194636"
}'
const response = await fetch('https://api.gravv.xyz/v1/risk/start-kyc', {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Idempotency-Key': 'card-kyc-b84d9a52-attempt-1',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"customer_id": "d2581d3c-7c55-4607-9717-546694194636"
}),
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.gravv.xyz/v1/risk/start-kyc"
headers = {
"Api-Key": "<api-key>",
"Idempotency-Key": "card-kyc-b84d9a52-attempt-1",
}
payload = {
"customer_id": "d2581d3c-7c55-4607-9717-546694194636",
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"customer_id": "d2581d3c-7c55-4607-9717-546694194636"
}`)
req, err := http.NewRequest("POST", "https://api.gravv.xyz/v1/risk/start-kyc", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Api-Key", "<api-key>")
req.Header.Set("Idempotency-Key", "card-kyc-b84d9a52-attempt-1")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "json"
require "net/http"
require "uri"
uri = URI("https://api.gravv.xyz/v1/risk/start-kyc")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Post.new(uri)
request["Api-Key"] = "<api-key>"
request["Idempotency-Key"] = "card-kyc-b84d9a52-attempt-1"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
"customer_id" => "d2581d3c-7c55-4607-9717-546694194636",
})
response = http.request(request)
puts response.code
puts response.body
<?php
$payload = [
'customer_id' => 'd2581d3c-7c55-4607-9717-546694194636',
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.gravv.xyz/v1/risk/start-kyc',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Api-Key: <api-key>',
'Idempotency-Key: card-kyc-b84d9a52-attempt-1',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String payload = """
{
"customer_id": "d2581d3c-7c55-4607-9717-546694194636"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gravv.xyz/v1/risk/start-kyc"))
.header("Api-Key", "<api-key>")
.header("Idempotency-Key", "card-kyc-b84d9a52-attempt-1")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.gravv.xyz/v1/risk/start-kyc");
request.Headers.TryAddWithoutValidation("Api-Key", "<api-key>");
request.Headers.TryAddWithoutValidation("Idempotency-Key", "card-kyc-b84d9a52-attempt-1");
request.Content = new StringContent(
"""
{
"customer_id": "d2581d3c-7c55-4607-9717-546694194636"
}
""",
Encoding.UTF8,
"application/json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200400OK
{
"data": {
"status": "success",
"applicant_id": "66f0c2a1b3d4e5f6a7b8c9d0",
"kyc_level": "basic",
"review_status": "pending",
"external_user_id": "d2581d3c-7c55-4607-9717-546694194636",
"web_url": "https://verify.gravv.xyz/websdk/p/example_token"
},
"error": null
}
{
"data": null,
"error": "CUSTOMER_NOT_FOUND: Customer not found. Please verify the customer exists in our system."
}