BrandKwikID Documentation
CKYC Flow

Search and Download V2 vs V3

Understanding the differences between CKYC API versions

Search and Download V2 vs V3

The Search and Download V2 vs V3 section explains the key differences between CKYC API versions, particularly focusing on the new OTP-based consent mechanism introduced in V3.

Note: The versions referred to as V2 and V3 in this documentation correspond to versions 1.2 and 1.3 respectively in the underlying CKYC gateway implementation.

Overview

CKYC has implemented significant changes in API version 3.0 (backend version 1.3), primarily introducing an OTP-based consent mechanism for downloading individual KYC records. This change ensures customer consent and enhances security.

Key Changes in V3

What Changed:

  • Customer Consent: Explicit permission required before data access
  • Enhanced Security: Two-factor authentication for data retrieval
  • Privacy Protection: Customer awareness of data access
  • Regulatory Compliance: Alignment with data protection laws

Effective Date: May 9, 2025

API Version Differences

FeatureV2 (Legacy)V3 (Current)
Consent RequiredNoYes (OTP-based)
AuthenticationSHA-1SHA-256
Download ProcessSingle stepTwo-step (initiate + verify)
Customer InvolvementNoneOTP verification required
Security LevelBasicEnhanced

V2 (Legacy) Process

Search and Download Process

  1. API Call: Send a search request with customer details to find their CKYC record.
  2. Response: Receive search results, including the CKYC number.
  3. Download Call: Use the CKYC number and an authentication factor (like Date of Birth) to download the KYC data in a single step.

API Endpoints (V2)

Search:

POST /api/ckyc/search

Download:

POST /api/ckyc/v2

Response Format (V2)

{
  "status": "success",
  "ckyc_id": "12345678901234",
  "kyc_data": {
    "customer_details": {...},
    "identity_documents": [...],
    "address_details": {...}
  }
}

V3 (Current) Process

OTP-Based Search and Download Flow

  1. Search API Call: Send a search request with customer details to find their CKYC record.
  2. Search Response: Receive search results, including the CKYC number.
  3. Initiate Download: Make a download request using the CKYC number and an authentication factor. This action triggers an OTP to the customer's registered mobile number.
  4. OTP Verification: The customer provides the OTP, which is sent to the validation endpoint.
  5. Data Release: Upon successful OTP verification, the KYC data is released.

API Endpoints (V3)

The V3 process involves three main endpoints in the underlying Java service, exposed via the Python gateway:

Search:

POST /api/ckyc/search 

Note: The Python gateway uses a generic search endpoint that currently routes to the V2/v1.2 Java implementation. The V3/v1.3 search logic is available in the Java service at /v3/api/ckyc/search.

1. Initiate Download & Trigger OTP:

POST /v3/api/ckyc/download

2. Verify OTP & Download Data:

POST /v3/api/ckyc/validate-otp

Step 1: Initiate Download

This call starts the download process and triggers the OTP.

POST /v3/api/ckyc/download
Content-Type: application/json
Authorization: Bearer {token}

Request Body:

{
  "ckyc_no": "12345678901234",
  "auth_factor_type": "01", // e.g., '01' for Date of Birth
  "auth_factor": "18-08-1994"
}

Response: An OTP is sent to the customer's registered mobile number, and the API returns a confirmation message.

{
  "message": "OTP has been sent to the registered mobile number.",
  "status": 200
}

Step 2: Verify OTP and Download

This call verifies the OTP and, if successful, returns the customer's KYC data.

POST /v3/api/ckyc/validate-otp
Content-Type: application/json
Authorization: Bearer {token}

Request Body:

{
  "ckyc_no": "12345678901234",
  "otp": "123456",
  "validate": "Y"
}

Response: KYC data is returned upon successful OTP verification.

{
  "data": {
    "PID_DATA": {
      // ... complete KYC data ...
    }
  },
  "status": 200,
  "version": "1.3"
}

Migration Timeline

Important Dates

  • Test Environment: Available immediately
  • Production Go-Live: May 9, 2025
  • Legacy Support End: May 31, 2025 (8 PM)

Migration Steps

  1. API Upgrade: Update to the V3 endpoints.
  2. OTP Integration: Implement the OTP collection and verification flow in your application.
  3. Testing: Validate the complete flow in the test environment.
  4. Deployment: Go live before the May 31, 2025 deadline.

Implementation Changes

Authentication Updates

  • Hashing Algorithm: Upgrade from SHA-1 to SHA-256 for digital signatures.
  • Token Management: Ensure proper handling of API authentication tokens.
  • Error Handling: Implement logic for OTP-specific errors (e.g., invalid OTP, expired OTP).

User Experience Changes

  • OTP Collection: Add an interface for users to input the OTP.
  • Customer Communication: Clearly explain the purpose of the OTP to the end-user.
  • Fallback Options: Consider alternative verification methods if OTP delivery fails.

Error Handling

  • OTP Expired: Handle scenarios where the OTP has expired and needs to be resent.
  • Invalid OTP: Implement retry mechanisms for incorrect OTP entry.
  • Mobile Not Found: Manage cases where a mobile number is not available for the customer.

Benefits of V3

Enhanced Security

  • Customer Consent: Explicit permission is captured for data access.
  • Two-Factor Authentication: OTP adds a crucial layer of security.
  • Audit Trail: A complete record of customer consent is maintained.
  • Fraud Prevention: Reduces the risk of unauthorized data access.

Regulatory Compliance

  • Data Protection: Aligns with modern data privacy laws and regulations.
  • Customer Rights: Ensures customers are aware of when their data is being accessed.
  • Audit Requirements: Meets regulatory needs for auditable consent.

Business Value

  • Customer Trust: A transparent data access process builds customer confidence.
  • Risk Reduction: Lowers compliance and security risks for the institution.
  • Future-Proof: Aligns with the evolving regulatory landscape.

Common Scenarios

Successful Flow

  1. Search: Find customer in CKYC registry
  2. Initiate: Request download (OTP sent)
  3. OTP: Customer provides OTP
  4. Download: KYC data released
  5. Complete: Process finished successfully

OTP Failure Scenarios

  1. OTP Expired: Request new OTP
  2. Invalid OTP: Customer enters wrong OTP
  3. Mobile Unavailable: Customer can't receive OTP
  4. Fallback: Alternative verification methods

Error Handling

  1. Network Issues: Retry with exponential backoff
  2. API Errors: Handle specific error codes
  3. Rate Limiting: Implement proper throttling
  4. System Failures: Graceful degradation

Best Practices

Implementation

  • Test Thoroughly: Use test environment for validation
  • Error Handling: Implement comprehensive error handling
  • User Experience: Design intuitive OTP flow
  • Monitoring: Track success rates and failures

Customer Communication

  • Clear Messaging: Explain why OTP is required
  • Support Options: Provide help for OTP issues
  • Training: Train staff on new process

Security

  • Token Management: Secure API credential handling
  • Data Protection: Encrypt sensitive data
  • Access Control: Implement proper permissions
  • Audit Logging: Track all access attempts

Testing

Test Environment

  • Access: Available for integration testing
  • Data: Sample CKYC records for testing
  • Support: Technical assistance for testing
  • Validation: Test all scenarios before production

Test Scenarios

  • Successful Search: Valid customer search
  • OTP Flow: Complete OTP verification process
  • Error Handling: Various error scenarios
  • Performance: Load testing and optimization

Support & Resources

Documentation

  • API Reference: Complete V3 endpoint documentation
  • Migration Guide: Step-by-step migration instructions
  • Code Examples: Sample code in multiple languages

Technical Support

  • Migration Help: Assistance with V2 to V3 migration
  • Integration Support: Help with implementation
  • Issue Resolution: Support for technical challenges

For additional support with V2 to V3 migration, please contact our technical team.