Skip to main content

Upload KYC

POST 

/v1/users/upload/kyc

Submit KYC documents and information for user verification

Encryption Requirements

The following parameters must be encrypted before sending:

  • firstName
  • lastName
  • panNumber
  • aadharNumber

Code for encryption

const crypto = require("crypto");

const encrypt = (plainText, password) => {
try {
const iv = crypto.randomBytes(16);
const key = crypto.createHash('sha256').update(password).digest('base64').substr(0, 32);
const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);

let encrypted = cipher.update(plainText);
encrypted = Buffer.concat([encrypted, cipher.final()])
return iv.toString('hex') + ':' + encrypted.toString('hex');

} catch (error) {
console.log(error);
}
}

// To generate encryption
const sampleText = "apple";
const encryptedText = encrypt(sampleText, SECRET_KEY);
console.log(encryptedText);

Contact for SECRET_KEY

For access to SECRET_KEY for encryption, please contact support@onmeta.in

Request

Responses

Success