Skip to main content
POST
/
v2
/
users
/
{userId}
/
kyc
/
upi
/
verify
Verify UPI
curl --request POST \
  --url https://api.stablepay.global/v2/users/{userId}/kyc/upi/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "upiId": "<string>",
  "deviceId": "<string>"
}
'

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.
upiId
string
required
UPI ID in format username@bank (e.g., rahul@upi, kumar@paytm)
deviceId
string
required
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:
ScoreResult
>= 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

UPI ID Format

Valid UPI ID formats:
  • username@upi
  • username@bank (e.g., @paytm, @okaxis, @ybl)
  • mobile@bank (e.g., 9876543210@paytm)

Errors

CodeDescription
VALIDATION_ERRORInvalid UPI ID format
ALREADY_VERIFIEDUPI is already verified for this user
VERIFICATION_FAILEDUPI verification API error