A vendor tells your procurement team that they are a registered MSME. You ask for the Udyam number. They cannot find it, or they send a screenshot, or they quote a number that fails validation. Meanwhile you hold their PAN, because you needed it for tax. POST /v1/verify/pan-to-udyam is for that moment: you send the PAN, and the API returns whether a Udyam registration is linked to it and, if so, the registration number. You can then verify that number for the size class and certificate with the Udyam API.
The endpoint is small, and most of what makes it useful lies in how you use it: when one call is enough, when you need two, how to treat the three outcomes the registry can give, how to run it over a whole vendor base without tripping your rate limit, and how to keep an audit trail that a finance reviewer will accept. That is what the rest of this page covers, along with the sandbox, billing and the privacy questions that come with looking up an enterprise by a personal identifier.
The moment this API is for
Think of the Udyam API and this one as a pair. The first takes a registration number and tells you about the registration. The second takes a PAN and tells you whether there is a registration to ask about. They answer different questions, and choosing between them is a matter of what you hold.
If you hold the Udyam number, call the Udyam API directly; adding a PAN lookup in front of it only costs you money. If you hold only a PAN, this endpoint is the way in. If you hold neither, you are in a documents conversation with the vendor, not an API one. The common real-world trigger is a vendor master where the "MSME registration" column is mostly empty or full of free text, and a business reason (a payment-period rule, a supplier diversity target, a bank's priority-sector reporting) to fill it in.
One more point of orientation. This endpoint finds a number; it does not tell you the enterprise's name, class, certificate or anything else about the registration. Those come from the Udyam API in a second call. Treat the number you get here as a lead to be verified, not as a conclusion.
How a PAN maps to a registration
An Udyam registration is made by an enterprise, and the enterprise's PAN is tied to it. For a proprietorship the PAN is the proprietor's personal PAN, for a firm or LLP it is the entity's PAN, and for a company it is the company's PAN. Each enterprise is allowed one registration, which is why this endpoint returns at most one number and not a list. That is a real difference from the PAN to GSTIN API, where one PAN commonly has many registrations because GST is registered state by state.
Two implications follow. First, the answer is simple to handle: a number or nothing. Second, a proprietor who runs more than one business under one PAN is still one enterprise for this purpose, so the number you get covers the enterprise as registered and you should not expect one per business. If your vendor insists they have two registrations, ask for both certificates.
The fourth letter of the PAN tells you the category of the holder. P is an individual (a proprietor), C a company, F a firm or LLP, H a Hindu Undivided Family, T a trust. Checking it against what the vendor told you before you spend a call is free, and a vendor who claims to be a company but gives you a P PAN is worth a question. The PAN API verifies the number and the name when you want certainty.
The request and the response
The request has one field, pan, in the usual ABCDE1234F format. The response guarantees referenceId, verificationId and found, and carries status, pan, udyam and udyamNumber. udyam is the registration number, or null when none is linked; udyamNumber always carries the same value and is kept for existing integrations. The tables below are rendered from the same API data as the reference page.
Request parameters
| Field | Type | Description |
|---|---|---|
Authorizationrequired | header | Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted. |
panrequired | string | PAN to find the linked Udyam registration for, format ABCDE1234F. |
Response fields
| Field | Type | Description |
|---|---|---|
referenceId | string | StampMitra's own transaction id for this call (SMV-YYYYMMDD-XXXXXXX). Always present, including on a negative result. |
verificationId | string | StampMitra's own id for this verification (VRF- followed by 12 base32 characters). Generated for every call, unique to it. Always present. Quote it in support requests. |
found | boolean | Whether an active Udyam registration was found for the PAN. Always present. |
status | string | Outcome of the lookup: SUCCESS, UDYAM_NOT_FOUND or UDYAM_IS_CANCELLED. |
pan | string | The PAN the lookup was made for. |
udyam | string or null | The Udyam registration number linked to the PAN, at most one. null when no registration is linked. |
udyamNumber | string or null | Same value as udyam. Kept so existing integrations keep working. |
found is true only when an active registration is linked to the PAN. udyam is the registration number, in the UDYAM-XX-00-0000000 layout, and is null when nothing was found; udyamNumber has the same value under its earlier name. status is the registry's outcome: SUCCESS, UDYAM_NOT_FOUND or UDYAM_IS_CANCELLED. pan is the PAN the lookup was made for. referenceId has the form SMV-YYYYMMDD-XXXXXXX, is present on every answer and is what you quote to support; it is not an idempotency key. verificationId is StampMitra's own id for this one lookup (VRF- followed by twelve characters), also present on every answer and different every time; quote it with the referenceId in a support request.
Three outcomes, one flag
The registry can give three answers for a PAN, and the endpoint reduces them to one flag plus a label.
| Outcome | found | udyam and udyamNumber | What it means |
|---|---|---|---|
| A registration is linked | true | The number | An active registration exists for this PAN |
| Nothing is linked | false | null | No registration is known for this PAN |
| A registration was cancelled | false | null | A registration existed and is no longer in force |
The status label separates the second and third rows. The values are the registry's: SUCCESS, UDYAM_NOT_FOUND and UDYAM_IS_CANCELLED. Because the registry can change its wording, never compare the label in code. Branch on found; show the label to a human reviewer so that they can tell a vendor that never registered from one whose registration was cancelled.
That difference matters in the conversation you have next. A vendor with nothing linked may genuinely not be registered, or may have registered under a different PAN (for example, the firm's rather than the proprietor's), or may have a registration that has not yet appeared. A vendor whose registration was cancelled once had one, and the useful question is whether a new registration exists. Neither is proof of anything; both are prompts to ask for the certificate.
One call or two
Whether you need a second call depends on what you intend to do with the number.
If you only need to record that the vendor is registered and what the number is, the lookup alone may be enough. You hold the registration number and can ask the vendor for the certificate during your next review.
If you need the enterprise name to compare with the vendor's name, the size class to apply a payment rule, or the certificate for your file, call the Udyam API with the number you got. That is two paid calls for one vendor, and the second is only needed when the first finds something. Make the second call conditional on found: true in code, so a vendor with nothing linked costs one call and not two.
If the lookup finds a number that the vendor has already given you and the two agree, you can skip it for the next cycle and re-verify only the number. If they disagree, you have found something worth a conversation: the vendor may have a second registration, may have typed a colleague's number, or may be quoting an old one.
A support flow for vendors who do not know their number
The commonest cause of a failed MSME data-collection exercise is asking vendors for something they cannot easily find. A flow built on this endpoint reduces the burden.
Collect the PAN, which vendors know, and verify it. Run the lookup. If a registration is found, show the vendor the number and ask them to confirm it, perhaps with the enterprise name from the Udyam call so they recognise it. If nothing is found, tell them neutrally that you could not find a registration linked to that PAN, and offer two ways forward: upload the certificate, or confirm that they are not registered. If the registration was cancelled, say that, and ask whether they have registered again.
Keep the vendor in control of the final statement. The registry result is evidence, and the vendor's confirmation is a declaration; store both, with the dates and the referenceId, because the combination is what a reviewer will want to see later. And do not put pressure on vendors to register: whether to register is the vendor's decision, and your process should work for vendors who have not.
Entity types and what the PAN tells you
The vendor's legal form changes what you should expect from a lookup.
| Vendor type | PAN you hold | What to expect |
|---|---|---|
| Sole proprietor | The individual's PAN, fourth letter P | A registration, if the proprietor registered the enterprise under that PAN |
| Partnership or LLP | The entity's PAN, fourth letter F | A registration under the entity's PAN |
| Company | The company's PAN, fourth letter C | A registration under the company's PAN; many large companies have none |
| Trust or society | The entity's PAN, fourth letter T or other | Possibly none; ask for documents |
| Large listed company | The company's PAN | Almost certainly none, and not a case worth a paid call |
The last row is the useful one for cost. A buyer's vendor base often includes large corporates that are obviously not micro or small enterprises. A not-found for such a vendor is expected, and a lookup for it is money spent to learn nothing. Filter them out before you run a batch: the PAN category and your own knowledge of the vendor are enough.
Calling the API from Node.js, Python and cURL
The clients validate the PAN locally, send an idempotency key, retry only the failures that can succeed on retry, and return a result you can branch on. The second step, verifying the number, is a call to the Udyam endpoint shown on its own page.
// pan-to-udyam.mjs (Node.js 18+)
import { randomUUID } from "node:crypto";
const BASE = "https://api-b2b.stampmitra.in";
const PAN_RE = /^[A-Z]{5}[0-9]{4}[A-Z]$/;
const URN_RE = /^UDYAM-[A-Z]{2}-[0-9]{2}-[0-9]{7}$/;
const RETRYABLE = new Set([429, 502, 503, 504]);
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
export async function udyamForPan(rawPan, runId = randomUUID()) {
const pan = String(rawPan ?? "").replace(/\s+/g, "").toUpperCase();
if (!PAN_RE.test(pan)) return { outcome: "bad_input" };
// stable per PAN and run: a crashed batch that restarts does not pay twice
const key = `p2u-${runId}-${pan}`;
for (let attempt = 1; attempt <= 4; attempt++) {
let res;
try {
res = await fetch(`${BASE}/v1/verify/pan-to-udyam`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": key },
body: JSON.stringify({ pan }),
signal: AbortSignal.timeout(20_000),
});
} catch {
if (attempt === 4) return { outcome: "unavailable" };
await sleep(2 ** attempt * 500 + Math.random() * 250);
continue;
}
const json = await res.json().catch(() => ({}));
if (res.ok) {
const raw = json.udyam ?? json.udyamNumber; // the same value; udyamNumber is the earlier name
const number = typeof raw === "string" ? raw.toUpperCase() : null;
return {
outcome: json.found === true && number && URN_RE.test(number) ? "linked" : "not_linked",
referenceId: json.referenceId,
registryStatus: json.status, // a label for reviewers, never compared in code
udyamNumber: number,
};
}
if (RETRYABLE.has(res.status) && attempt < 4) {
await sleep(2 ** attempt * 500 + Math.random() * 250);
continue;
}
const err = json.error ?? {};
return { outcome: res.status === 402 ? "wallet_empty" : "error", status: res.status, code: err.code, requestId: err.requestId };
}
}# pan_to_udyam.py (Python 3.9+, pip install requests)
import os, re, time, uuid, random, requests
BASE = "https://api-b2b.stampmitra.in"
PAN_RE = re.compile(r"^[A-Z]{5}[0-9]{4}[A-Z]$")
URN_RE = re.compile(r"^UDYAM-[A-Z]{2}-[0-9]{2}-[0-9]{7}$")
RETRYABLE = {429, 502, 503, 504}
def udyam_for_pan(raw_pan, run_id=None):
pan = re.sub(r"\s+", "", raw_pan or "").upper()
if not PAN_RE.match(pan):
return {"outcome": "bad_input"}
key = f"p2u-{run_id or uuid.uuid4()}-{pan}" # stable per PAN and run
for attempt in range(1, 5):
try:
r = requests.post(
f"{BASE}/v1/verify/pan-to-udyam",
json={"pan": pan},
headers={"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}", "Idempotency-Key": key},
timeout=20,
)
except requests.RequestException:
if attempt == 4:
return {"outcome": "unavailable"}
time.sleep(2 ** attempt * 0.5 + random.random() * 0.25)
continue
body = r.json() if r.content else {}
if r.ok:
number = str(body.get("udyam") or body.get("udyamNumber") or "").upper() or None
linked = body.get("found") is True and number is not None and URN_RE.match(number) is not None
return {"outcome": "linked" if linked else "not_linked", "referenceId": body.get("referenceId"),
"registryStatus": body.get("status"), "udyamNumber": number}
if r.status_code in RETRYABLE and attempt < 4:
time.sleep(2 ** attempt * 0.5 + random.random() * 0.25)
continue
err = body.get("error", {})
return {"outcome": "wallet_empty" if r.status_code == 402 else "error", "status": r.status_code,
"code": err.get("code"), "requestId": err.get("requestId")}curl -X POST "https://api-b2b.stampmitra.in/v1/verify/pan-to-udyam" \
-H "Authorization: Bearer $STAMPMITRA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"pan":"ABCDE1234F"}'Notice that the clients check the returned number against the Udyam layout before they call it a link. If a number ever came back malformed, you want a not_linked and a log line, not a failed second call and a confusing error. Libraries that wrap this call are on the SDKs page, and the Postman collection is good for trying it by hand.
Running a whole vendor base through it
A backfill over thousands of PANs is where this endpoint earns its keep and where careless scheduling hurts. Do the arithmetic first. For 5,000 PANs that survive your filters, the lookups alone cost 5,000 times the per-call rate plus 18% GST. If, say, a fifth of them link to a registration and you verify each, add 1,000 Udyam calls. On the plan allowing 60 requests per minute, the 5,000 lookups take roughly 84 minutes if they have the allowance to themselves, and the allowance is shared across everything your account does, so plan for the job to run at about half speed, overnight. At 300 requests per minute the job takes under half an hour at full speed.
Build the job around a queue. Take PANs from a table, mark each as claimed, call the endpoint, write the result and the referenceId back, and release. Use an idempotency key built from a run id and the PAN, as in the snippet above, so that if the job crashes and restarts, the PANs it already finished are answered from the stored response without another charge. Pace the workers below the allowance, and make them back off when they see 429s instead of retrying in a tight loop. Count outcomes as you go; a sudden rise in bad_input means your data has a problem, and a rise in 502 means you should slow down and let the dependency recover.
Before you start, filter. Drop PANs the PAN check has marked as not valid. Drop large companies you already know are not micro or small enterprises. Drop vendors for whom you already hold a verified Udyam number. Each filter is a call you do not pay for.
Errors, billing and limits for this endpoint
Failures all use one body, { "error": { "code", "message", "requestId" } }, shown below from the API data. Keep requestId in your logs and branch on status and code.
400Validation errorBAD_REQUESTpan must match the format ABCDE1234F
401Missing or invalid API keyUNAUTHORIZEDMissing or invalid API key.
402Insufficient wallet balancePAYMENT_REQUIREDInsufficient fulfilment wallet balance to cover this call.
403Valid key, missing required scopeFORBIDDENAPI key is valid but lacks the required scope for this endpoint.
429Rate limitedTOO_MANY_REQUESTSRate limit exceeded: 60 requests per 60 seconds for this endpoint.
502Upstream verification service unreachableINTERNAL_ERRORUnable to reach the order/customer service right now
In this endpoint's terms: a 400 means the PAN did not match the layout or the body had an unknown property; nothing was looked up, and nothing was billed. A 402 means the wallet could not cover the call, so no lookup ran. A 429 means you exceeded your plan's per-minute allowance, and a 502 means the source could not be reached, so there is no answer yet. A found: false is a normal 200, a completed lookup and a billed one.
Billing is the same shape as for the other lookups. A call that returns an answer is charged, whatever the answer; a failed call is not; sandbox is never charged. On pay-as-you-go the price is ₹5 per answered call before GST, lower on Growth and Scale, as listed on the pricing page. The allowance is a plan matter: one per-minute bucket shared by every key and route in an environment, 60, 300 or 1,000 requests on pay-as-you-go, Growth and Scale at the time of writing, and 20 in sandbox. More keys do not add capacity, and the acceptable use policy prohibits rotating them to avoid the limit. Calls are visible in your dashboard's request log for as long as your plan keeps them.
Sandbox behaviour and what it cannot show
Sandbox keys start with sk_test_ and production keys with sk_live_; the request is the same. Sandbox answers come from a stored sample, not from the registry. The test values table on this page lists the PANs that select each outcome: found, not found (found: false with status UDYAM_NOT_FOUND and null for udyam and udyamNumber, which SNDBX9999F also gives), cancelled (UDYAM_IS_CANCELLED) and the error responses. Any other well-formed PAN returns the documented success example with your PAN echoed in pan: found: true, status SUCCESS and the registration number UDYAM-MH-26-1234567, the same every time, together with the sandbox marker fields.
The convenient part is that the number in the sandbox answer has the layout the Udyam API expects, so a two-step test works end to end in sandbox with no setup. The limits are the obvious ones: sandbox cannot show a cancelled registration, a number that fails the layout check, a different number per PAN, or any realistic enterprise data, so write fixtures for those. And the sandbox is deliberately small: 10 requests a minute and 200 a day per organisation (the day resets at midnight IST), after which the API returns 429, and call history is kept for 30 days. Use it to prove the integration, and use the readiness runner in your dashboard for extra scripted scenarios, which does not consume the quota. Going live means applying for production access in the dashboard, which is reviewed, funding the wallet, issuing a production key with the scope you need and releasing behind a flag. See the guide on sandbox versus production keys.
A worked scenario: a hospital group's supplier classification
Take an invented hospital group, Deccan Care, whose procurement team buys consumables, linen, catering and equipment servicing from about 900 suppliers. The finance head wants to know which suppliers are micro or small enterprises before the half-year close. Procurement holds PANs for almost all suppliers, but registration numbers for fewer than one in ten.
Step one is triage with no paid calls. The team classifies suppliers by the fourth letter of the PAN and by what they know. About 120 are large corporates or pharma distributors that are obviously outside the exercise; they are excluded. Another 60 are individuals running small shops, who are likely to be proprietors. The rest are firms and private companies of varying size.
Step two is the batch: about 700 lookups, run overnight at a modest pace with a run id in the idempotency key. Results land in a staging table with the PAN, the referenceId, the outcome and the registry label. Roughly a fifth link to a registration. Those suppliers go to step three, which calls the Udyam API for the name, the class and the certificate, and the team downloads and stores the certificates.
Step four is the human part. Suppliers with nothing linked receive a short, neutral message asking whether they are registered and inviting them to upload a certificate; suppliers whose registration was cancelled receive a slightly different message asking whether they have registered again. Replies are recorded as declarations next to the registry result. Procurement reviews the exceptions, a handful of which turn out to be registrations under a firm's PAN where the vendor master held the proprietor's.
The output is a classified vendor list with an evidence trail for each row. It took one overnight run and a few days of replies, not a quarter of chasing. And it left a repeatable process: new suppliers go through the same two calls at onboarding.
Evidence and audit trail
Because the result feeds a financial rule, keep the evidence in a form you can defend. For each supplier store the PAN in masked form, the referenceId of the lookup, the outcome, the registry label, the date, and the rule version that was in force. Where you also called the Udyam API, store its referenceId, the class and the field it came from, and the certificate file if you downloaded one. Where a supplier made a declaration, store the date and the text. Keep names, addresses and certificates under the access controls you use for other vendor documents.
If an auditor asks why a supplier was treated as micro, you can then show a registry lookup, a verification, a certificate and, where relevant, the supplier's own statement, each with a date and a reference. That chain is much stronger than a column filled in by hand.
Why the answer can change between runs
A lookup is a reading of the register at one moment, and the register moves. A vendor who had no registration last quarter may have registered since. A registration may be cancelled and a new one issued. A proprietor may change the PAN linked to the enterprise. A lookup you ran in March is therefore not evidence for what is true in October.
This matters in two ways for design. First, store the date next to every result and treat anything older than your policy window as stale, with the window set by how much money rides on the answer. A supplier you pay every week under a payment rule needs a fresher answer than one you paid once. Second, when you re-run for an existing supplier, treat a change as information. A supplier that moves from not linked to linked is a prompt to verify the new number and update the class. A supplier that moves from linked to cancelled is a prompt to stop treating it as registered and to ask what happened. A supplier whose number changed is a prompt to find out whether there are two registrations. Do not overwrite the old record when you write the new one; add a row, so that you can show the history.
Putting the lookup beside the other checks
The PAN-to-Udyam call fits in a larger vendor check, and the order matters.
| Step | Call | Why it comes here |
|---|---|---|
| 1 | Local PAN checks | Free: layout, uppercase, fourth letter against the declared type |
| 2 | PAN verification | Confirms the PAN exists and gives the registered name, so you stop early if it does not |
| 3 | This lookup | Finds the registration number for a vendor who did not give one |
| 4 | Udyam verification | Name, class and certificate for the number from step 3 |
| 5 | GSTIN verification or PAN to GSTIN | Confirms the GST registration, which is a separate record |
| 6 | Bank account | Confirms that payment will reach the right name |
Not every vendor needs every step. A vendor that is obviously a large corporate can skip steps 3 and 4. A vendor that already gave you a verified Udyam number skips step 3. A one-off payment may need only steps 1, 2 and 6. The point of the table is the order: cheap before expensive, and each step proving something the next one relies on. If step 2 shows that the PAN is not valid, the later steps would be built on nothing, so stop there and ask the vendor to correct it.
When names matter, compare them across steps rather than within one. The registered name from the PAN check, the enterprise name from the Udyam call, the legal name from the GSTIN call and the name at the bank can all differ for innocent reasons: a trade name, an abbreviation, a change of name. Show them side by side to a reviewer instead of insisting on equality, and record the reviewer's reason when they accept a difference. The broader design for several registries is in the guide on business verification with GSTIN, CIN and Udyam, and the KYC use case shows the same ideas for lenders.
A checklist before you go live
Six checks cover most of what goes wrong when this integration first meets real data. The key holds the verification.pan_to_udyam.read scope and, if you also call the Udyam API, verification.udyam.read, and nothing else; it is kept in a secrets manager and out of source control. The wallet is funded with margin for the largest batch you plan, and a low-balance alert reaches a person who can act on it. The batch job runs through a queue, below the plan's allowance, with an idempotency key built from a run id and the PAN. The second call is conditional on found: true, so that vendors with nothing linked cost one call. The audit row stores the masked PAN, both referenceId values, the outcome, the label, the date and the rule version, and the logs hold no clear PANs. And the notice to vendors is live before the first lookup, saying what you will check and why.
Ship behind a flag, run a pilot on a few dozen vendors you can reach, compare the results with what they tell you, and only then run the whole base. The pilot also tells you how your vendors react to the message you send when nothing is found, which is worth knowing before you send it to nine hundred of them.
Responsible use
This endpoint takes a personal identifier and returns an enterprise registration. For a proprietor those are close to the same thing: the PAN is the person's, and the registration is theirs. Use it where you have a relationship and a purpose you can describe, such as classifying your own suppliers or onboarding a vendor. Tell the people whose PANs you use what you will check and why, keep a record of that notice, and use the result only for that purpose.
Do not use the endpoint to look up businesses you have no reason to deal with, to compile lists of MSMEs, or to try ranges of PANs. The acceptable use policy prohibits systematic enumeration of information you are not authorised to access, and calls are logged against your account. India's Digital Personal Data Protection Act, 2023 is being brought into force in phases and applies to personal data in this flow. This page is general information and not legal advice; confirm your obligations with qualified counsel. The developer privacy policy and the data processing addendum describe how responsibilities are divided with StampMitra.
Moving from another provider and modelling cost
If you are replacing another PAN-to-MSME lookup, compare what it returned with what this endpoint returns: the PAN, a number and a status, nothing more. If the old provider returned the enterprise name or class in the same call, plan for the second call to the Udyam endpoint. Port your business rule and not the old branching code, and run both providers over a sample of your PANs for a few days to see where they differ; send anything you cannot explain to support with the referenceId values.
For cost, count lookups for the vendors that survive your filters, add Udyam calls for the ones that link, multiply by the respective per-call rates, add 18% GST, and compare the total with the Growth or Scale plan fee if your volume is high enough for the lower rates to matter. The savings are in the filters and in making the second call conditional on the first.
Edge cases and mistakes
- Comparing the status label. Use
found; show the label to people. - Calling the Udyam API when the lookup found nothing. Make the second call conditional.
- Running the lookup for vendors you already hold a number for. Verify the number directly.
- Looking up large corporates. A not-found is expected; skip them.
- Expecting a list. There is at most one number.
- Using the wrong PAN. For a proprietorship the proprietor's PAN is the one; for a firm, the firm's. A not-found under one PAN does not rule out a registration under another.
- Treating not found as proof of no registration. It is evidence; ask for the certificate.
- Retrying without an idempotency key. A retry after a timeout can be charged twice.
- Running a backfill at full speed. Pace below the allowance and run overnight.
- Storing PANs in clear in logs. Mask them.
- Pressuring vendors. Registration is the vendor's decision; design the process to work without it.
Sources and what to confirm
- StampMitra PAN to Udyam reference, API docs: endpoint, scope, parameters, response and error examples, checked against the product data in 2026.
- StampMitra pricing and authentication pages: per-call rates, plan limits, key model and environments, read in 2026.
- Ministry of Micro, Small and Medium Enterprises and the Udyam registration portal: the one-registration-per-enterprise approach and the number layout. Confirm current rules and thresholds against the portal and the latest notifications.
- StampMitra acceptable use policy: purpose limits and the ban on enumeration and rate-limit evasion, read in 2026.
Sandbox test values
Send one of these values as pan with a sandbox key (sk_test_...) to get that outcome. They are fake, valid in format, and never reach a real source or your wallet. Add the header X-Sandbox-Delay-Ms (up to 3000) to hold the reply and test your client timeout.
| Scenario | Input to send | What you get back |
|---|---|---|
| Udyam found for the PAN | SNDBX0001F | 200 |
| No Udyam for the PAN | SNDBX0002F | 200 |
| Udyam cancelled | SNDBX0004F | 200 |
| Verification source times out | SNDBX0005F | 502INTERNAL_ERROR |
| Verification source unavailable | SNDBX0006F | 502INTERNAL_ERROR |
| Rate limited | SNDBX0007F | 429TOO_MANY_REQUESTS |
| Wallet balance too low | SNDBX0008F | 402PAYMENT_REQUIRED |
| Invalid format | SNDBX0000 | 400BAD_REQUEST |
Frequently asked questions
What does the PAN to Udyam API return?
It returns a found flag, the registry status, the PAN it looked up and, when an active registration is linked to the PAN, the Udyam number in udyam and in udyamNumber, which carries the same value for existing integrations. It also returns a referenceId and a verificationId. It returns at most one number, because an enterprise has one registration, and udyam is null when none is linked. It does not return the enterprise name, class or certificate.
When do I need the Udyam API as well?
When you need the enterprise name to compare with the vendor, the size class to apply a payment rule, or the certificate for your file. Call it with the number you found, and only when found was true, so vendors with nothing linked cost one call.
Why does it return a single number rather than a list?
Each enterprise is allowed one Udyam registration, tied to the enterprise's PAN, so the lookup returns a number or nothing. That differs from PAN to GSTIN, where GST registration is state-wise and one PAN commonly has many GSTINs.
What is the difference between nothing linked and cancelled?
Both return found false with no number. The status value distinguishes a PAN with no registration from one whose registration was cancelled: UDYAM_NOT_FOUND and UDYAM_IS_CANCELLED. Branch on found in code and show the label to a reviewer.
Does found false prove that the vendor is not an MSME?
No. It is evidence, not proof. The vendor may have registered under a different PAN, such as the firm's instead of the proprietor's, or may not yet appear. Ask for the certificate and verify the number on it with the Udyam API.
Should I look up large companies?
Usually not. Large corporates are almost certainly not micro or small enterprises and a not-found is expected, so the call buys nothing. Filter them out using the PAN category and your own knowledge before running a batch.
Which PAN works for a sole proprietor?
The proprietor's own individual PAN, which has P as the fourth letter. A firm or LLP uses the entity's PAN, with F, and a company uses its own PAN, with C. A not-found under one PAN does not rule out a registration under another.
How do I run this over thousands of vendors?
Use a queue with workers paced below your plan's per-minute allowance, run it overnight, and build each idempotency key from a run id and the PAN so a restart does not pay twice. Filter out invalid PANs, large corporates and vendors you already hold a verified number for.
Am I billed when nothing is linked?
Yes. A call that completes with an answer is billed, and found false is an answer. Failed calls with a 400, 429 or 502 are not billed, and sandbox calls are never billed. Idempotency keys prevent double charges on retries.
Which PANs can I use in the sandbox?
The test values table on the product page lists the PANs that select each outcome. SNDBX9999F always returns found false, with status UDYAM_NOT_FOUND and null for udyam and udyamNumber. Any other well-formed PAN returns the documented success example with your PAN echoed in pan, found true and the number UDYAM-MH-26-1234567, which has the layout the Udyam sandbox expects.
What are the rate limits for this endpoint?
The limit is per plan and shared by all keys and routes in an environment, counted per minute. At the time of writing it is 60 on pay-as-you-go, 300 on Growth and 1,000 on Scale, with 10 for a sandbox key, plus 200 requests a day per organisation. The pricing page lists current figures. The pricing page lists current figures.
Is it acceptable to look up PANs of businesses I have no relationship with?
No. Use the endpoint for your own suppliers, vendors or customers, with a purpose you can describe. The acceptable use policy prohibits systematic enumeration of information you are not authorised to access, and calls are logged against your account.