Update Cardholder (Deprecated)
curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update \
--header 'Content-Type: application/json' \
--header 'X-Forwarded-From: <x-forwarded-from>' \
--data '
{
"cardholderId": "ch-12345678",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW"
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update"
payload = {
"cardholderId": "ch-12345678",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW"
}
headers = {
"X-Forwarded-From": "<x-forwarded-from>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Forwarded-From': '<x-forwarded-from>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardholderId: 'ch-12345678',
personalInfo: {
firstName: 'John',
lastName: 'Doe',
middleName: 'William',
dateOfBirth: '1990-01-15T00:00:00.000Z',
gender: 'MALE',
nationality: 'US',
email: 'john.doe@example.com',
phoneNumber: '+1234567890',
mobileNumber: '+1234567890'
},
residentialAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
},
mailingAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
},
employmentInfo: {
employerName: 'Tech Corp',
occupationCode: '001',
occupationTitle: 'Software Engineer',
industry: 'TECHNOLOGY',
employmentStatus: 'FULL_TIME',
employmentStartDate: '2020-01-01T00:00:00.000Z',
monthlyIncome: 5000,
annualIncome: 60000,
incomeCurrency: 'USD',
employerAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
}
},
kycDocuments: [
{
documentType: 'PASSPORT',
documentNumber: 'AB123456789',
documentExpiryDate: '2030-01-15T00:00:00.000Z',
documentIssueDate: '2020-01-15T00:00:00.000Z',
documentIssuingCountry: 'US',
documentFrontImageUrl: 'https://example.com/doc-front.jpg',
documentBackImageUrl: 'https://example.com/doc-back.jpg',
selfieImageUrl: 'https://example.com/selfie.jpg',
verificationStatus: 'PENDING'
}
],
cardholderType: 'B2B',
riskLevel: 'LOW'
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update', 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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update",
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([
'cardholderId' => 'ch-12345678',
'personalInfo' => [
'firstName' => 'John',
'lastName' => 'Doe',
'middleName' => 'William',
'dateOfBirth' => '1990-01-15T00:00:00.000Z',
'gender' => 'MALE',
'nationality' => 'US',
'email' => 'john.doe@example.com',
'phoneNumber' => '+1234567890',
'mobileNumber' => '+1234567890'
],
'residentialAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
],
'mailingAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
],
'employmentInfo' => [
'employerName' => 'Tech Corp',
'occupationCode' => '001',
'occupationTitle' => 'Software Engineer',
'industry' => 'TECHNOLOGY',
'employmentStatus' => 'FULL_TIME',
'employmentStartDate' => '2020-01-01T00:00:00.000Z',
'monthlyIncome' => 5000,
'annualIncome' => 60000,
'incomeCurrency' => 'USD',
'employerAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
]
],
'kycDocuments' => [
[
'documentType' => 'PASSPORT',
'documentNumber' => 'AB123456789',
'documentExpiryDate' => '2030-01-15T00:00:00.000Z',
'documentIssueDate' => '2020-01-15T00:00:00.000Z',
'documentIssuingCountry' => 'US',
'documentFrontImageUrl' => 'https://example.com/doc-front.jpg',
'documentBackImageUrl' => 'https://example.com/doc-back.jpg',
'selfieImageUrl' => 'https://example.com/selfie.jpg',
'verificationStatus' => 'PENDING'
]
],
'cardholderType' => 'B2B',
'riskLevel' => 'LOW'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Forwarded-From: <x-forwarded-from>"
],
]);
$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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update"
payload := strings.NewReader("{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Forwarded-From", "<x-forwarded-from>")
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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update")
.header("X-Forwarded-From", "<x-forwarded-from>")
.header("Content-Type", "application/json")
.body("{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Forwarded-From"] = '<x-forwarded-from>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Success",
"data": {
"cardholderId": "ch-12345678",
"accountId": "wsb-12345678",
"cardholderReference": "REF123456",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW",
"kycLevel": "STANDARD",
"sourceOfFunds": "SALARY",
"purposeOfAccount": "PERSONAL_USE",
"politicallyExposedPerson": false,
"sanctionsScreeningRequired": true,
"cardholderStatus": "ACTIVE",
"kycStatus": "VERIFIED",
"verificationTime": 1640995200000,
"createTime": 1640995200000,
"updateTime": 1640995200000,
"numberOfCards": 2,
"activeCards": 2
}
}Cardholders
Update Cardholder
Update cardholder v1 (deprecated, use v2)
POST
/
api
/
v2.1
/
fincard
/
virtual
/
card
/
holder
/
update
Update Cardholder (Deprecated)
curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update \
--header 'Content-Type: application/json' \
--header 'X-Forwarded-From: <x-forwarded-from>' \
--data '
{
"cardholderId": "ch-12345678",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW"
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update"
payload = {
"cardholderId": "ch-12345678",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": True
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW"
}
headers = {
"X-Forwarded-From": "<x-forwarded-from>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Forwarded-From': '<x-forwarded-from>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardholderId: 'ch-12345678',
personalInfo: {
firstName: 'John',
lastName: 'Doe',
middleName: 'William',
dateOfBirth: '1990-01-15T00:00:00.000Z',
gender: 'MALE',
nationality: 'US',
email: 'john.doe@example.com',
phoneNumber: '+1234567890',
mobileNumber: '+1234567890'
},
residentialAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
},
mailingAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
},
employmentInfo: {
employerName: 'Tech Corp',
occupationCode: '001',
occupationTitle: 'Software Engineer',
industry: 'TECHNOLOGY',
employmentStatus: 'FULL_TIME',
employmentStartDate: '2020-01-01T00:00:00.000Z',
monthlyIncome: 5000,
annualIncome: 60000,
incomeCurrency: 'USD',
employerAddress: {
addressLine1: '123 Main St',
addressLine2: 'Apt 4B',
city: 'New York',
state: 'NY',
postalCode: '10001',
country: 'US',
addressType: 'RESIDENTIAL',
isPrimary: true
}
},
kycDocuments: [
{
documentType: 'PASSPORT',
documentNumber: 'AB123456789',
documentExpiryDate: '2030-01-15T00:00:00.000Z',
documentIssueDate: '2020-01-15T00:00:00.000Z',
documentIssuingCountry: 'US',
documentFrontImageUrl: 'https://example.com/doc-front.jpg',
documentBackImageUrl: 'https://example.com/doc-back.jpg',
selfieImageUrl: 'https://example.com/selfie.jpg',
verificationStatus: 'PENDING'
}
],
cardholderType: 'B2B',
riskLevel: 'LOW'
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update', 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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update",
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([
'cardholderId' => 'ch-12345678',
'personalInfo' => [
'firstName' => 'John',
'lastName' => 'Doe',
'middleName' => 'William',
'dateOfBirth' => '1990-01-15T00:00:00.000Z',
'gender' => 'MALE',
'nationality' => 'US',
'email' => 'john.doe@example.com',
'phoneNumber' => '+1234567890',
'mobileNumber' => '+1234567890'
],
'residentialAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
],
'mailingAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
],
'employmentInfo' => [
'employerName' => 'Tech Corp',
'occupationCode' => '001',
'occupationTitle' => 'Software Engineer',
'industry' => 'TECHNOLOGY',
'employmentStatus' => 'FULL_TIME',
'employmentStartDate' => '2020-01-01T00:00:00.000Z',
'monthlyIncome' => 5000,
'annualIncome' => 60000,
'incomeCurrency' => 'USD',
'employerAddress' => [
'addressLine1' => '123 Main St',
'addressLine2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'postalCode' => '10001',
'country' => 'US',
'addressType' => 'RESIDENTIAL',
'isPrimary' => true
]
],
'kycDocuments' => [
[
'documentType' => 'PASSPORT',
'documentNumber' => 'AB123456789',
'documentExpiryDate' => '2030-01-15T00:00:00.000Z',
'documentIssueDate' => '2020-01-15T00:00:00.000Z',
'documentIssuingCountry' => 'US',
'documentFrontImageUrl' => 'https://example.com/doc-front.jpg',
'documentBackImageUrl' => 'https://example.com/doc-back.jpg',
'selfieImageUrl' => 'https://example.com/selfie.jpg',
'verificationStatus' => 'PENDING'
]
],
'cardholderType' => 'B2B',
'riskLevel' => 'LOW'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Forwarded-From: <x-forwarded-from>"
],
]);
$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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update"
payload := strings.NewReader("{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Forwarded-From", "<x-forwarded-from>")
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://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update")
.header("X-Forwarded-From", "<x-forwarded-from>")
.header("Content-Type", "application/json")
.body("{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/fincard/virtual/card/holder/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Forwarded-From"] = '<x-forwarded-from>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardholderId\": \"ch-12345678\",\n \"personalInfo\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"middleName\": \"William\",\n \"dateOfBirth\": \"1990-01-15T00:00:00.000Z\",\n \"gender\": \"MALE\",\n \"nationality\": \"US\",\n \"email\": \"john.doe@example.com\",\n \"phoneNumber\": \"+1234567890\",\n \"mobileNumber\": \"+1234567890\"\n },\n \"residentialAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"mailingAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n },\n \"employmentInfo\": {\n \"employerName\": \"Tech Corp\",\n \"occupationCode\": \"001\",\n \"occupationTitle\": \"Software Engineer\",\n \"industry\": \"TECHNOLOGY\",\n \"employmentStatus\": \"FULL_TIME\",\n \"employmentStartDate\": \"2020-01-01T00:00:00.000Z\",\n \"monthlyIncome\": 5000,\n \"annualIncome\": 60000,\n \"incomeCurrency\": \"USD\",\n \"employerAddress\": {\n \"addressLine1\": \"123 Main St\",\n \"addressLine2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postalCode\": \"10001\",\n \"country\": \"US\",\n \"addressType\": \"RESIDENTIAL\",\n \"isPrimary\": true\n }\n },\n \"kycDocuments\": [\n {\n \"documentType\": \"PASSPORT\",\n \"documentNumber\": \"AB123456789\",\n \"documentExpiryDate\": \"2030-01-15T00:00:00.000Z\",\n \"documentIssueDate\": \"2020-01-15T00:00:00.000Z\",\n \"documentIssuingCountry\": \"US\",\n \"documentFrontImageUrl\": \"https://example.com/doc-front.jpg\",\n \"documentBackImageUrl\": \"https://example.com/doc-back.jpg\",\n \"selfieImageUrl\": \"https://example.com/selfie.jpg\",\n \"verificationStatus\": \"PENDING\"\n }\n ],\n \"cardholderType\": \"B2B\",\n \"riskLevel\": \"LOW\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Success",
"data": {
"cardholderId": "ch-12345678",
"accountId": "wsb-12345678",
"cardholderReference": "REF123456",
"personalInfo": {
"firstName": "John",
"lastName": "Doe",
"middleName": "William",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE",
"nationality": "US",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"mobileNumber": "+1234567890"
},
"residentialAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"mailingAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
},
"employmentInfo": {
"employerName": "Tech Corp",
"occupationCode": "001",
"occupationTitle": "Software Engineer",
"industry": "TECHNOLOGY",
"employmentStatus": "FULL_TIME",
"employmentStartDate": "2020-01-01T00:00:00.000Z",
"monthlyIncome": 5000,
"annualIncome": 60000,
"incomeCurrency": "USD",
"employerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"addressType": "RESIDENTIAL",
"isPrimary": true
}
},
"kycDocuments": [
{
"documentType": "PASSPORT",
"documentNumber": "AB123456789",
"documentExpiryDate": "2030-01-15T00:00:00.000Z",
"documentIssueDate": "2020-01-15T00:00:00.000Z",
"documentIssuingCountry": "US",
"documentFrontImageUrl": "https://example.com/doc-front.jpg",
"documentBackImageUrl": "https://example.com/doc-back.jpg",
"selfieImageUrl": "https://example.com/selfie.jpg",
"verificationStatus": "PENDING"
}
],
"cardholderType": "B2B",
"riskLevel": "LOW",
"kycLevel": "STANDARD",
"sourceOfFunds": "SALARY",
"purposeOfAccount": "PERSONAL_USE",
"politicallyExposedPerson": false,
"sanctionsScreeningRequired": true,
"cardholderStatus": "ACTIVE",
"kycStatus": "VERIFIED",
"verificationTime": 1640995200000,
"createTime": 1640995200000,
"updateTime": 1640995200000,
"numberOfCards": 2,
"activeCards": 2
}
}Headers
User agent
Forwarded for
Client application identifier
Example:
"client-app"
Tenant ID
Device ID
Platform
Body
application/json
Update cardholder request
Update cardholder request (V1)
Cardholder ID
Example:
"ch-12345678"
Personal information (optional)
Show child attributes
Show child attributes
Residential address (optional)
Show child attributes
Show child attributes
Mailing address (optional)
Show child attributes
Show child attributes
Employment information (optional)
Show child attributes
Show child attributes
KYC documents (optional)
Show child attributes
Show child attributes
Cardholder type (optional)
Example:
"B2B"
Risk level (optional)
Example:
"LOW"
⌘I