Submitting KYC Data
6min
curl location 'http //stg api onmeta in/v1/users/upload/kyc' \\ \ header 'x api key 5ca5bb65 1d99 4716 9225 113e60da85ee' \\ \ form 'email="sample\@gmail com"' \\ \ form 'selfie=@"/path/to/file"' \\ \ form 'aadharfront=@"/path/to/file"' \\ \ form 'aadharback=@"/path/to/file"' \\ \ form 'panfront=@"/path/to/file"' \\ \ form 'panback=@"/path/to/file"' \\ \ form 'pannumber=""' \\ \ form 'aadharnumber=""' \\ \ form 'firstname=""' \\ \ form 'lastname=""' \\ \ form 'incomerange=""' \\ \ form 'profession=""' \\ all the above data in the request body should be form data make sure you submit valid kyc (aadhaar, pan) details the below parameters are required and need to be encrypted using following code 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 sampletext = "apple" encryptedtext = encrypt(sampletext, secret key) console log(encryptedtext) for access to secret key for encryption please contact nirmal\@onmeta in create a post request with above encrypted values for successfully uploading kyc data please check curl format and response format on the right