curl --request POST \
--url https://api.saber.money/api/v2/user/kyc/initiate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Request-Id: <x-request-id>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"country": "USA",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-15",
"address": {
"address_line1": "123 Main St",
"address_line2": "",
"locality": "Downtown",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_iso2": "US"
},
"user_nationality_iso2": "US"
}
'import requests
url = "https://api.saber.money/api/v2/user/kyc/initiate"
payload = {
"country": "USA",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-15",
"address": {
"address_line1": "123 Main St",
"address_line2": "",
"locality": "Downtown",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_iso2": "US"
},
"user_nationality_iso2": "US"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Signature": "<x-signature>",
"X-Timestamp": "<x-timestamp>",
"X-Request-Id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Signature': '<x-signature>',
'X-Timestamp': '<x-timestamp>',
'X-Request-Id': '<x-request-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
country: 'USA',
first_name: 'John',
last_name: 'Doe',
date_of_birth: '1990-01-15',
address: {
address_line1: '123 Main St',
address_line2: '',
locality: 'Downtown',
city: 'New York',
state: 'NY',
postal_code: '10001',
country_iso2: 'US'
},
user_nationality_iso2: 'US'
})
};
fetch('https://api.saber.money/api/v2/user/kyc/initiate', 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.saber.money/api/v2/user/kyc/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'USA',
'first_name' => 'John',
'last_name' => 'Doe',
'date_of_birth' => '1990-01-15',
'address' => [
'address_line1' => '123 Main St',
'address_line2' => '',
'locality' => 'Downtown',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country_iso2' => 'US'
],
'user_nationality_iso2' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Request-Id: <x-request-id>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.saber.money/api/v2/user/kyc/initiate"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Request-Id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.saber.money/api/v2/user/kyc/initiate")
.header("X-Api-Key", "<x-api-key>")
.header("X-Signature", "<x-signature>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Request-Id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saber.money/api/v2/user/kyc/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Signature"] = '<x-signature>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Request-Id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"status": "PENDING",
"url": "https://partner.kyc-provider.example/session/abc123"
}
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}Initiate KYC (Generate KYC URL)
Initiate KYC flow for the user. For some countries (e.g. USA), this generates a KYC partner redirect URL dynamically via this API call.
Scope: USD onramp flows only.
For India, use the KYC Widget instead: https://app.saber.money/kyc?client_id=...&user_id=...×tamp=...&secret=..., with secret = HMAC-SHA256 of client_id + timestamp + "sdk" + user_id. See the KYC Widget guide, or KYC Sharing as the non-widget option.
For country: "USA", the response includes a status (ACTIVE or PENDING) and a redirect url for the KYC flow.
curl --request POST \
--url https://api.saber.money/api/v2/user/kyc/initiate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Request-Id: <x-request-id>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"country": "USA",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-15",
"address": {
"address_line1": "123 Main St",
"address_line2": "",
"locality": "Downtown",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_iso2": "US"
},
"user_nationality_iso2": "US"
}
'import requests
url = "https://api.saber.money/api/v2/user/kyc/initiate"
payload = {
"country": "USA",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-15",
"address": {
"address_line1": "123 Main St",
"address_line2": "",
"locality": "Downtown",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_iso2": "US"
},
"user_nationality_iso2": "US"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Signature": "<x-signature>",
"X-Timestamp": "<x-timestamp>",
"X-Request-Id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Signature': '<x-signature>',
'X-Timestamp': '<x-timestamp>',
'X-Request-Id': '<x-request-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
country: 'USA',
first_name: 'John',
last_name: 'Doe',
date_of_birth: '1990-01-15',
address: {
address_line1: '123 Main St',
address_line2: '',
locality: 'Downtown',
city: 'New York',
state: 'NY',
postal_code: '10001',
country_iso2: 'US'
},
user_nationality_iso2: 'US'
})
};
fetch('https://api.saber.money/api/v2/user/kyc/initiate', 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.saber.money/api/v2/user/kyc/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'USA',
'first_name' => 'John',
'last_name' => 'Doe',
'date_of_birth' => '1990-01-15',
'address' => [
'address_line1' => '123 Main St',
'address_line2' => '',
'locality' => 'Downtown',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country_iso2' => 'US'
],
'user_nationality_iso2' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Request-Id: <x-request-id>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.saber.money/api/v2/user/kyc/initiate"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Request-Id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.saber.money/api/v2/user/kyc/initiate")
.header("X-Api-Key", "<x-api-key>")
.header("X-Signature", "<x-signature>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Request-Id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saber.money/api/v2/user/kyc/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Signature"] = '<x-signature>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Request-Id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"USA\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-15\",\n \"address\": {\n \"address_line1\": \"123 Main St\",\n \"address_line2\": \"\",\n \"locality\": \"Downtown\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country_iso2\": \"US\"\n },\n \"user_nationality_iso2\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"status": "PENDING",
"url": "https://partner.kyc-provider.example/session/abc123"
}
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}{
"success": false,
"errors": [
{
"code": 304001,
"text": "invalid country code"
}
]
}Headers
Your API key (configured in credentials)
HMAC-SHA256 signature (auto-generated) To test manually: HMAC-SHA256 of apiKey + timestamp (or apiKey + timestamp + userId when X-User-Id is required), keyed with your API secret. The HMAC Generator flow computes this for you.
Unix timestamp in seconds (auto-generated) Unix seconds, e.g. Math.floor(Date.now() / 1000). Must match the timestamp used in the X-Signature computation.
Unique request identifier (auto-generated) Any unique string per request, e.g. a UUID.
Platform identifier (e.g. android, ios, web).
Device IP address.
Device latitude.
Device longitude.
Body
ISO alpha-3 country code (e.g. IND, USA). Primary required field.
User's first name.
User's last name.
Date of birth in YYYY-MM-DD format. User must be of legal KYC age.
User's address. If any sub-field is provided, then address_line1, locality, city, state, and postal_code are all required.
Show child attributes
Show child attributes
User's nationality as ISO alpha-2 country code (e.g. IN).
Was this page helpful?