Verify UPI
UPI verification is optional. Users can complete KYC and transact without UPI verification. Only Aadhaar, PAN, and Bank are required.
Verifies the user’s UPI ID (Virtual Payment Address) and checks if the account holder name matches KYC records.
UPI ID in format username@bank (e.g., rahul@upi, kumar@paytm)
Device fingerprint/ID for FIU compliance. Must be captured from the client device.
Request
curl -X POST https://api.stablepay.global/v2/users/usr_abc123/kyc/upi/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"upiId": "rahul.kumar@upi",
"deviceId": "device-fingerprint-12345"
}'
Response (Verified)
{
"success": true,
"data": {
"verified": true,
"name": "RAHUL KUMAR",
"bankName": "State Bank of India",
"nameMatchScore": 92,
"message": "UPI ID verified successfully"
}
}
Response (Name Mismatch)
If the UPI ID is valid but the account holder name doesn’t match the Aadhaar name:
{
"success": true,
"data": {
"verified": false,
"name": "R KUMAR",
"bankName": "HDFC Bank",
"nameMatchScore": 65,
"message": "UPI ID verified but name does not match Aadhaar records"
}
}
Response (Invalid VPA)
{
"success": true,
"data": {
"verified": false,
"name": null,
"bankName": null,
"nameMatchScore": null,
"message": "UPI ID verification failed - invalid VPA"
}
}
Name Matching
The API performs fuzzy name matching between the UPI account holder name and the user’s Aadhaar name:
| Score | Result |
|---|
| >= 70% | Names match - verification passes |
| < 70% | Names don’t match - verification fails |
The name matching algorithm:
- Normalizes names (removes titles like Mr/Mrs/Shri)
- Handles word order variations
- Uses Levenshtein distance for similarity
Valid UPI ID formats:
username@upi
username@bank (e.g., @paytm, @okaxis, @ybl)
mobile@bank (e.g., 9876543210@paytm)
Errors
| Code | Description |
|---|
VALIDATION_ERROR | Invalid UPI ID format |
ALREADY_VERIFIED | UPI is already verified for this user |
VERIFICATION_FAILED | UPI verification API error |