Mobile to UPI ID API
Takes a mobile number (with consent) and returns the UPI IDs linked to it, the registered name and a suggested primary VPA for payouts.
- Source
- NPCI UPI mapper and PSP look-ups through a partner bank
- Turnaround
- Real time, a few seconds
- Endpoint
- POST /v1/upi/mobile-lookup
- Who can use it
- Businesses paying or refunding their own customers, with the mobile owner's consent.
Overview
Most people don't know their own UPI ID, but everyone knows their mobile number. With the user's consent, this API looks up the UPI IDs linked to that number and the name on them. Users get paid without typing a VPA, and you get an extra signal that the number belongs to the person you onboarded.
Good to know
Coverage depends on how people set up UPI. A missing result does not mean the person has no UPI ID.
What you get
- No VPA typingAsk for the mobile number you already have, then show the UPI name for the user to confirm.
- Name on the accountGet the registered name and compare it with your KYC record.
- Primary VPA suggestedWhere several IDs are linked, we suggest one that is suitable for payouts.
- Ownership signalIf the UPI name matches your KYC name, it's a good sign the number really belongs to the user.
Request
POST https://api.ampletrails.com/v1/upi/mobile-lookup
| Field | Type | Status | Description |
|---|---|---|---|
mobile | string | Required | 10-digit Indian mobile number |
consent | string | Required | Y when the mobile owner has consented |
Response
Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.
| Field | Meaning | Example |
|---|---|---|
found | Whether any UPI ID is linked to the number | true |
vpas | List of linked UPI IDs | ravi@okbank, 9876543210@upi |
name | Registered name on the primary UPI ID | RAVI KUMAR |
primary_vpa | UPI ID suggested for payouts | ravi@okbank |
psp | UPI app or bank handle of the primary VPA | okbank |
Example
curl -X POST https://api.ampletrails.com/v1/upi/mobile-lookup \
-H "Authorization: Bearer $AMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mobile": "9876543210", "consent": "Y"}'import os, requests
resp = requests.post(
"https://api.ampletrails.com/v1/upi/mobile-lookup",
headers={"Authorization": f"Bearer {os.environ['AMPLE_API_KEY']}"},
json={
"mobile": "9876543210",
"consent": "Y"
},
timeout=30,
)
resp.raise_for_status()
print(resp.json()["data"])const resp = await fetch("https://api.ampletrails.com/v1/upi/mobile-lookup", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AMPLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"mobile": "9876543210",
"consent": "Y"
}),
});
const { data } = await resp.json();$ch = curl_init("https://api.ampletrails.com/v1/upi/mobile-lookup");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AMPLE_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["mobile" => "9876543210", "consent" => "Y"]),
]);
$data = json_decode(curl_exec($ch), true)["data"];{
"status": "success",
"request_id": "req_7f3a9c21e4",
"data": {
"found": true,
"vpas": "ravi@okbank, 9876543210@upi",
"name": "RAVI KUMAR",
"primary_vpa": "ravi@okbank",
"psp": "okbank"
}
}Example data. The exact field list for your account comes with your sandbox documentation.
Use cases
Gig worker payouts
Pay delivery and field partners straight to the UPI linked to their registered number.
Insurance and lending refunds
Return excess EMIs or premiums without asking the customer for bank details again.
Mobile ownership check
Use the UPI name as a soft check that the mobile number used for OTP belongs to the applicant.
Questions about this API
Is this allowed without the user knowing?
No. Only look up numbers with the owner's consent and for a stated purpose, like paying them. Don't use it to profile people.
What if nothing is found?
Some people haven't set up UPI, or use a VPA that isn't based on their number. Fall back to asking for a VPA or bank account.
Can it return more than one VPA?
Yes. People often have UPI on two or three apps. We list them and mark one as the suggested primary.
Should I verify the VPA again before paying?
For large or delayed payouts, yes. Run UPI VPA verification just before you send the money.
Try the Mobile to UPI ID API
Sandbox keys, the full field reference and a Postman collection, usually within a working day.