Integration Flow - Verify Against CKYC Database
Learn how you can use ZWITCH APIs to verify an individual's photo against their photo in the CKYC database.
With ZWITH, you can verify an individual's photo against their photo in the CKYC database in 3 steps.
- Check CKYC Registration
- Upload Photo
- Verify Photo
1. Check CKYC Registration
First, you need to check if the individual is registered in the CKYC database.
Use the below endpoint to check if the individual is registered in the CKYC database.
POST: https://api.zwitch.io/v1/kycs/ckyc
Below is a sample request and response for the Send OTP API.
{
"purpose": "savings_account",
"document_type": "pan",
"document_number": "AAAPA0000A",
"merchant_reference_id": "1002378",
"consent": "y"
}
{
"id": "ckyc_y60V1ZWa4oVpShsisqTf03Gvt",
"purpose": "savings_account",
"document_type": "pan",
"document_number": "AAAPA0000A",
"name": "Anil Reddy",
"ckyc_number": "O30040635514001",
"ckyc_date": "2020-12-31",
"merchant_reference_id": "1002378",
"is_sandbox": true,
"created_at": 1658925301
}
Learn more about our Check CKYC Registration API.
2. Upload Photo
After verifying the individual's Aadhaar, you need to upload their photo to our server. This photo will be compared to the photo in the Aadhaar database.
Use the below endpoint to upload the required documents.
POST: https://api.zwitch.io/v1/documents
Below is a sample request and response for the Upload Document API.
curl --location --request POST 'https://api.zwitch.io/v1/documents' \
--header 'Authorization: Bearer <Access_Key>:<Secret_Key>' \
-- header 'Content-Type: multipart/form-data' \
--form 'file=@"/Users/your_name/sample_uploaded.png"' \
--form 'type="customer_photo"'
{
"id": "doc_hYShM7oGLNRQoxyCh6ETd4Og7",
"object": "document",
"name": "doc_hYShM7oGLNRQoxyCh6ETd4Og7.png",
"content_type": "image/png",
"type": "customer_photo",
"size": 22004,
"customer_accessible": true,
"created_at": 1654255503,
"is_sandbox": true
}
Learn more about our Document Upload API.
3. Verify Photo
After checking if the individual is registered in the CKYC database and uploading their photo, you can verify the uploaded photo against their photo in the Aadhaar database.
Use the below endpoint to upload the required photo.
POST: https://api.zwitch.io/v1/kycs/photo-match
Below is a sample request and response for the Photo Verification API.
{
"type": "ckyc",
"ckyc_verification_id": "ckyc_yNLB19Y0NCLsDt50fR252qq3b",
"document_id": "doc_qsUwixnXwHI4tZLQnbf1xn2tQ",
"minimum_match_score": 75,
"metadata": {
"key_1": "DD",
"key_2": "XOF"
}
}
{
"id": "phm_mDJezeS7z3tBJzv5qlQOJIvWA",
"object": "photo_match.ckyc",
"type": "ckyc",
"ckyc_verification_id": "ckyc_SQMGqA448nF7VhzYhpnPt0qNl/",
"document_id": "doc_qsUwixnXwHI4tZLQnbf1xn2tQ",
"minimum_match_score": 75,
"status": "success/failed",
"match_score": 99.97,
"review_needed": false,
"metadata": {
"key_1": "DD",
"key_2": "XOF"
},
"created_at": 1656417101,
"updated_at": 1656417101,
"is_sandbox": true
}
Learn more about our Photo Verification API.
Updated 8 months ago