curl --request POST \
--url https://api.chainrails.io/api/v1/ramp/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "YELLOW_CARD",
"userEmail": "[email protected]",
"countryCode": "NG",
"fiatCurrency": "NGN",
"fields": {
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"BVN": "12345678901"
},
"callbackUrl": "https://app.example.com/kyc/complete",
"cryptoAmount": 25
}
'import requests
url = "https://api.chainrails.io/api/v1/ramp/kyc"
payload = {
"provider": "YELLOW_CARD",
"userEmail": "[email protected]",
"countryCode": "NG",
"fiatCurrency": "NGN",
"fields": {
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"BVN": "12345678901"
},
"callbackUrl": "https://app.example.com/kyc/complete",
"cryptoAmount": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: 'YELLOW_CARD',
userEmail: '[email protected]',
countryCode: 'NG',
fiatCurrency: 'NGN',
fields: {
first_name: 'John',
last_name: 'Doe',
date_of_birth: '1990-01-01',
BVN: '12345678901'
},
callbackUrl: 'https://app.example.com/kyc/complete',
cryptoAmount: 25
})
};
fetch('https://api.chainrails.io/api/v1/ramp/kyc', 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.chainrails.io/api/v1/ramp/kyc",
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([
'provider' => 'YELLOW_CARD',
'userEmail' => '[email protected]',
'countryCode' => 'NG',
'fiatCurrency' => 'NGN',
'fields' => [
'first_name' => 'John',
'last_name' => 'Doe',
'date_of_birth' => '1990-01-01',
'BVN' => '12345678901'
],
'callbackUrl' => 'https://app.example.com/kyc/complete',
'cryptoAmount' => 25
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chainrails.io/api/v1/ramp/kyc"
payload := strings.NewReader("{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chainrails.io/api/v1/ramp/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/ramp/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}"
response = http.request(request)
puts response.read_bodySubmit KYC information
Submits available KYC fields. The Chainrails KYC engine determines whether text validation, external verification, or both are required.
curl --request POST \
--url https://api.chainrails.io/api/v1/ramp/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "YELLOW_CARD",
"userEmail": "[email protected]",
"countryCode": "NG",
"fiatCurrency": "NGN",
"fields": {
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"BVN": "12345678901"
},
"callbackUrl": "https://app.example.com/kyc/complete",
"cryptoAmount": 25
}
'import requests
url = "https://api.chainrails.io/api/v1/ramp/kyc"
payload = {
"provider": "YELLOW_CARD",
"userEmail": "[email protected]",
"countryCode": "NG",
"fiatCurrency": "NGN",
"fields": {
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"BVN": "12345678901"
},
"callbackUrl": "https://app.example.com/kyc/complete",
"cryptoAmount": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: 'YELLOW_CARD',
userEmail: '[email protected]',
countryCode: 'NG',
fiatCurrency: 'NGN',
fields: {
first_name: 'John',
last_name: 'Doe',
date_of_birth: '1990-01-01',
BVN: '12345678901'
},
callbackUrl: 'https://app.example.com/kyc/complete',
cryptoAmount: 25
})
};
fetch('https://api.chainrails.io/api/v1/ramp/kyc', 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.chainrails.io/api/v1/ramp/kyc",
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([
'provider' => 'YELLOW_CARD',
'userEmail' => '[email protected]',
'countryCode' => 'NG',
'fiatCurrency' => 'NGN',
'fields' => [
'first_name' => 'John',
'last_name' => 'Doe',
'date_of_birth' => '1990-01-01',
'BVN' => '12345678901'
],
'callbackUrl' => 'https://app.example.com/kyc/complete',
'cryptoAmount' => 25
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chainrails.io/api/v1/ramp/kyc"
payload := strings.NewReader("{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.chainrails.io/api/v1/ramp/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/ramp/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"YELLOW_CARD\",\n \"userEmail\": \"[email protected]\",\n \"countryCode\": \"NG\",\n \"fiatCurrency\": \"NGN\",\n \"fields\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-01-01\",\n \"BVN\": \"12345678901\"\n },\n \"callbackUrl\": \"https://app.example.com/kyc/complete\",\n \"cryptoAmount\": 25\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Enter your Chainrails API key as a Bearer token
Body
The ramp provider to submit KYC to
FONBNK, ONRAMP_MONEY, GUARDARIAN, YELLOW_CARD "YELLOW_CARD"
The end-user's email address
ISO 3166-1 alpha-2 transaction/corridor country. Submit the user’s residence separately as fields.country.
"NG"
ISO 4217 fiat currency code
"NGN"
KYC fields available for submission. country is the user’s current country of residence. The KYC engine decides whether text validation, external verification, or both are required.
{
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"BVN": "12345678901"
}
URL to redirect the user to after external KYC verification.
"https://app.example.com/kyc/complete"
Amount of crypto (USDC) the user intends to receive — used to compute canProceed in the response.
25
Response
Updated KYC state after submission
Was this page helpful?

