Submitting KYC Data
6 min
curl 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=""' \\ tab examples url http stg api onmeta in v1 users upload kyc name submit kyc data method post request pathparameters queryparameters headerparameters kind required name x api key type string children description name authorization kind required type string description bearer authtoken from login children bodydataparameters kind required name email type string children description kind required name selfie type string children description kind required name aadharfront type string children description kind required name aadharback type string children description kind required name panfront type string children description kind required name panback type string children description kind required name pannumber type string children description kind required name aadharnumber type string children description kind required name firstname type string children description kind required name lastname type string children description name incomerange kind required type string description income range as string from one of the below options n 10l 10l 15l 15l 20l 20l 25l 25l 50l 50l n children name profession kind required type string description occupation profession of the person nwriter journalist business man children formdataparameters results languages id jucblmbcb0x crttrgewg code n success true n language 200 customlabel id pfx zlodd k gadxkre r code n success false n message unable to verify users kyc n language 400 customlabel selectedlanguageid jucblmbcb0x crttrgewg examples languages id iw9osqoj0yqbcpnxbbpgb language curl code curl location http stg api onmeta in v1 users upload kyc n header x api key string n header authorization string n data email string selfie string aadharfront string aadharback string panfront string panback string pannumber string aadharnumber string firstname string lastname string customlabel id l9olpnuyz12oabxgyw62f language nodejs code var request require request ; nvar options n method post n url http stg api onmeta in v1 users upload kyc n headers n x api key string n authorization string n n body email string selfie string aadharfront string aadharback string panfront string panback string pannumber string aadharnumber string firstname string lastname string n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id 2v zxjwpjp cc lt1fypr language javascript code var myheaders new headers ; nmyheaders append x api key string ; nmyheaders append authorization string ; n nvar raw email string selfie string aadharfront string aadharback string panfront string panback string pannumber string aadharnumber string firstname string lastname string ; n nvar requestoptions n method post n headers myheaders n body raw n redirect follow n ; n nfetch http stg api onmeta in v1 users upload kyc requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id lm2p0simjqrgnqdbwtesv language python code import requests n nurl http stg api onmeta in v1 users upload kyc n npayload email string selfie string aadharfront string aadharback string panfront string panback string pannumber string aadharnumber string firstname string lastname string nheaders n x api key string n authorization string n n nresponse requests request post url headers headers data payload n nprint response text n customlabel id rzqhnefngkfdut0hppyzu language ruby code require uri nrequire net http n nurl uri http stg api onmeta in v1 users upload kyc n nhttp net http new url host url port ; nrequest net http post new url nrequest x api key string nrequest authorization string nrequest body email string selfie string aadharfront string aadharback string panfront string panback string pannumber string aadharnumber string firstname string lastname string n nresponse http request request nputs response read body n customlabel selectedlanguageid 2v zxjwpjp cc lt1fypr description user can submit kyc data through below api endpoint nupload n currentnewparameter label body parameter value bodydataparameters 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