Use this API to protect customer privacy by masking sensitive Aadhaar information. It masks the first 8 digits and disables QR codes, making Aadhaar cards safe to store in your database while maintaining compliance with data protection regulations.
View the test data and use the information to trigger the validations. The test data can be used only in the sandbox environment.
Response codes
| Sub code | Status | Message | Next action |
|---|---|---|---|
| 200 | SUCCESS | VALID | - |
| 200 | SUCCESS | INVALID_DOCUMENT | Upload a valid copy of the aadhaar. |
| 400 | ERROR | x-client-id is missing in the request | Enter all the header information in the API request. |
| 400 | ERROR | image is missing in the request | Upload the image file of the aadhaar card that needs masking. |
| 400 | ERROR | verification_id can include only alphanum, dot, hyphen and underscores | Only alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed. |
| 400 | ERROR | Client secret belongs to test environment | Enter the correct environment credentials in the request. |
| 401 | ERROR | Invalid clientId and clientSecret combination | Enter valid client ID and secret key in the request. |
| 403 | ERROR | IP not whitelisted your current IP is 106.51.91.104. For IP whitelisting assistance, visit our IP Whitelisting guide | Whitelist the IP address. |
| 409 | ERROR | verification ID already exists | Enter a unique verification ID. |
| 413 | ERROR | file size exceeded | The maximum file size should be 10 MB. |
| 422 | ERROR | Insufficient balance to process this request. | Ensure you have sufficient balance and then process the request. |
| 500 | ERROR | something went wrong | Try after some time. |
Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.
The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.
Send the signature if two-factor authentication is selected as Public Key. More details.
Find the request parameters to mask aadhaar number.
It is the image file of the aadhaar card that needs masking. Accepted formats - short, long, and PVC. Allowed file type - JPEG/JPG/PNG. The maximum file size should be 10 MB.
It is the unique ID you create to identify the verification request. The maximum character limit is 50. Only alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.
"testverificationid"
Success response for masking aadhaar number.
It displays the status of the aadhaar information.
"VALID"
It displays the unique ID created by Cashfree Payments for reference purposes.
format: int64
35476
It displays the unique ID you created to identify the verification request.
"testverificationid"
It displays the URL of the image.
"https://image.url.here"