EKYC 3.0 — Stage 6: Bank Account Verification

Backend-Only Developer Implementation Guide • RPD / PD Bank Verification + Name Match + STP Flag
Stage ID: BANK_VERIFIED Trigger: Customer initiates bank verification via RPD or PD BRD Section: 11 — Stage 6 Version: 1.0

Table of Contents

  1. Stage 6 Objective
  2. Preconditions
  3. Bank Verification Methods
  4. Backend Flow
  5. Bank Name Match Scoring
  6. Backend Validations
  7. Existing SP Mapping
  8. Error / Drop Codes
  9. Exit State
  10. Vendor Calls
  11. Database Tables (New Backend)
  12. Note about File Storage

1. Stage 6 Objective

Verify bank account ownership via RPD (Reverse Penny Drop) or PD (Penny Drop). The bank holder name returned by the verification is matched against ekyc_name to produce a name-match score (0–100). Annual income is also collected at this stage. The resulting stp_bank_flag feeds the downstream STP decision engine.

Key Concept RPD = Rs.1 debit initiated by customer via UPI; the bank returns the beneficiary name. PD = system-initiated penny credit to the account; bank returns holder name. Both methods ultimately produce a holder name for name-match scoring.

2. Preconditions

ConditionDetails
lead.stateDIGILOCKER_DONE (if Stage 5 ran) OR PAN_VERIFIED (if Stage 5 was skipped)
ekyc_nameMust be set — this is the reference name used for bank holder name matching

3. Bank Verification Methods

MethodChannelHow It Works
RPD (Reverse Penny Drop) Hyperverge SDK Rs.1 debit from customer's UPI. Bank returns beneficiary name as part of the UPI response. Fastest verification path.
PD (Penny Drop) Hyperverge SDK Customer manually enters bank account number + IFSC code. System initiates a penny credit; bank returns account holder name.
PD (Fallback) Perfios API Fallback if customer exits Hyperverge SDK. Redirected to Perfios in-house page for manual bank + IFSC + account entry. Same penny-drop logic via Perfios.
SDK Screen Layout RPD and PD options are presented on the same Hyperverge SDK screen. Customer can choose either method. If the SDK is exited entirely, the backend redirects to Perfios as a fallback.

4. Backend Flow

1
Hyperverge SDK launched — RPD + PD options available on the same screen
2
If customer exits SDK without completing → redirect to Perfios in-house page for fallback penny drop
3
Bank account dedup check — if the same bank account is already linked to a post-eSign lead, the attempt is blocked
4
Bank name match against ekyc_name — returns a score between 0 and 100
5
Score 70–100 = stp_bank_flag = STP  |  Score 1–69 = stp_bank_flag = NON_STP
6
Score 0 on attempt 1 or 2 → customer is asked to retry with a different bank account
7
Score 0 on attempt 3 → DROP_BANK_NAME_FAIL (permanent drop — journey cannot continue)
8
Maximum 3 different bank accounts may be attempted across all retries
9
Annual income range collected from customer selection
10
lead.state = BANK_VERIFIED — proceed to next stage

5. Bank Name Match Scoring

Score RangeSTP FlagAction
70 – 100 STP Bank verification passes. Journey continues with STP eligibility.
1 – 69 NON_STP Bank verification passes but flagged for manual review. Journey continues with NON_STP flag.
0 (attempt 1) Customer prompted: “Try a different bank account.” Previous bank data is deleted.
0 (attempt 2) Customer warned: “You have 1 more attempt remaining.” Previous bank data is deleted.
0 (attempt 3) DROP DROP_BANK_NAME_FAIL — permanent drop. Journey terminated.
Important: Attempt Counting Each attempt must use a different bank account. The system tracks unique accounts attempted. After 3 unique accounts with score 0, the lead is permanently dropped.

6. Backend Validations

ScenarioValidationOutcome
Account already linked to a post-eSign lead Bank account dedup check against existing leads Block — account cannot be used. Error code BE_BANK_DEDUPE.
Bank name match score = 0 on attempt 3 Attempt counter reaches maximum DROPDROP_BANK_NAME_FAIL. Journey permanently terminated.
Hyperverge SDK unavailable SDK health check / timeout Fallback — redirect to Perfios penny drop page.
Perfios also unavailable Perfios API health check / timeout CS Journey — lead placed on hold for Customer Service resolution. Code CS_BANK_API_DOWN.
RPD: no payment received / customer exits SDK SDK exit event or UPI timeout Redirect — customer redirected to Perfios in-house page for PD fallback.
Bank does not return holder name Empty or null holder name in response Error — verification marked as failed. Code BE_BANK_001. Customer may retry.

7. Existing SP Mapping

Old Stored Procedures

Stored ProcedurePurpose
USP_CHECK_BANB_IFSC_SJETValidate bank IFSC code
USP_GETBANKLIST_BY_IFSC_SJETGet bank list by IFSC
USP_ALLOW_PENNYDROP_SJETCheck if penny drop is allowed for the lead
USP_INSERT_UPDATE_STP_FLAG_SJETInsert/update STP flag after name match
USP_AINXT_BANKPROOFOCR_RESPONSE_SJETStore bank proof OCR response from AiNXT
USP_CHECK_NAME_MATCH_AU_SJETCheck name match result for AU
USP_DELETE_BANK_DATA_NAMEMISMATCH_SJETDelete bank data when name mismatch (score 0 retry)
USP_INSERT_UPDATE_BANKDETAILS_WITH_IFSC_SJETInsert/update bank details with IFSC

Old APIs

APIPurpose
BankAPI.STDALONE_PENNYDROP()Standalone penny drop verification
BankAPI.CallYESBANKIMPSSeparateHosting()YES Bank IMPS penny drop call
BankAPI.KARZA_BANK_AC_VERIFICATION()Karza bank account verification
NameMatchingAPI.NameMatchingExe()Execute name matching between bank holder name and ekyc_name

Old Tables

Table / ViewPurpose
TBL_CLIENT_BANKDETAILSClient bank account details
TBL_YESBANK_REQUEST_RESPONSE_LOGYES Bank IMPS request/response logs
TBL_KARZA_BANKAC_VALIDATE_RESPONSEKarza bank account validation responses
TBL_NAMEMATCHING_STP_FLAGName matching STP flag results
VW_RBIBANK_MASTER_ALLRBI bank master view (all banks)
BANKMASTERBank master reference table

8. Error / Drop Codes

CodeTypeDescription
DROP_BANK_NAME_FAIL DROP Bank holder name match score = 0 on all 3 attempts. Permanent journey termination.
CS_BANK_API_DOWN CS HOLD Both Hyperverge SDK and Perfios API are unavailable. Lead placed on CS hold.
BE_BANK_DEDUPE BLOCK Bank account already linked to a post-eSign lead. Account cannot be reused.
BE_BANK_001 ERROR Bank verification failed — bank did not return holder name or verification timed out. Customer may retry.

9. Exit State

Upon successful bank verification, the following fields are persisted:

FieldDescription
lead.stateBANK_VERIFIED
bank_account_hashSHA-256 hash of the verified bank account number (used for dedup)
bank_ifscIFSC code of the verified bank
bank_nameBank name resolved from IFSC master
bank_account_holder_nameHolder name returned by RPD/PD verification
bank_name_match_scoreName match score (0–100) against ekyc_name
stp_bank_flagSTP (score 70–100) or NON_STP (score 1–69)
bank_verification_methodRPD_HYPERVERGE, PD_HYPERVERGE, or PD_PERFIOS
bank_attempts_usedNumber of unique bank accounts attempted (1–3)
annual_income_rangeCustomer-selected annual income bracket

10. Vendor Calls

Vendor / ServicePurposeWhen Called
Hyperverge SDK RPD (Reverse Penny Drop) + PD (Penny Drop) bank verification Primary verification method — SDK launched at stage entry
Perfios API Fallback Penny Drop verification When customer exits Hyperverge SDK or SDK is unavailable
Claude API / AiNXT Name matching engine After bank holder name is returned — matches against ekyc_name
CleverTap Event tracking Bank verification attempt, success, failure, and drop events
Zoho CRM Lead update Bank verification status and STP flag sync
CDP Customer data platform sync Bank verification outcome and income data
Datalake Analytics and audit trail All bank verification events and name-match scores

11. Database Tables (New Backend)

Operational Tables

TablePurpose
leadsMaster lead table — stores state, stp_bank_flag, annual_income_range
bank_accountsVerified bank account details — account hash, IFSC, holder name, verification method
bank_verification_attemptsTracks each verification attempt — method, score, attempt number, account used
journey_stage_eventsStage transition audit log — BANK_VERIFIED entry with timestamp
downstream_eventsOutbound events to CleverTap, Zoho, CDP, Datalake
cs_journey_holdsCS hold records when both bank APIs are down

Reference Tables

TablePurpose
bank_ifsc_masterIFSC code lookup — resolves bank name, branch from IFSC

12. Note about File Storage

File Storage: Configured Drive Paths, NOT S3 File storage in this system uses configured drive paths via the document_path_info table. Files are not stored on S3 or any cloud object store. All file references resolve to local/network drive paths configured per environment.
OTP Storage: In-Memory, NOT Redis OTP values are stored in an in-memory store, not Redis. There is no external cache dependency for OTP management.