ABDM Compliance Checklist: M1-M3 Milestones and the Security Audit

Updated: December 3rd, 2026
20 mins read
ABDM Compliance Checklist_ M1-M3 Milestones and the Security Audit

When chasing your ABDM production credentials, make sure to scour and peruse all your OTP and consent endpoints, even the ones your team may have written months ago. This ABDM compliance checklist walks you through the three milestones; M1, M2, and M3. We additionally provide the code-level details and where the security audit intersects each stage. 

We’ve written this keeping CTOs, engineering leads, and founders in mind who want to ship an ABDM-integrated product. Moreover, if you’re new to the mission itself, we explain the terms as we go.

Here you get working code snippets, a pre-audit self-check, and a go-live checklist you can paste into your sprint board. We’ve thoughtfully built it around the ABDM guidelines for HIPs and HIUs so you can comfortably use it as a working reference.

What ABDM Compliance Actually Covers

The Ayushman Bharat Digital Mission (ABDM) is India’s national digital health layer. It combines patient and facility registries, a Gateway that routes requests, and APIs that move health records between providers once a patient consents. 

ABDM certification attaches to your software and not to the hospital using it. That’s why engineering teams usually own ABDM compliance.

The ABDM guidelines require your software to integrate with the mission’s building blocks and meet its digital health standards. You need to prove it all in your sandbox stage— across the three ABDM compliance milestones. 

  • M1 covers identity: creating, verifying, and linking ABHA numbers. 
  • M2 makes you a Health Information Provider (HIP) that serves records on request. 
  • M3 makes you a Health Information User (HIU) that fetches records from other providers, and consent sits underneath both M2 and M3.

Once the milestones are cleared, a Web Application Security Audit (WASA) by a CERT-In empaneled auditor is all that stands between you and production credentials. 

Our ABDM certification guide covers this business case, so this checklist stays on the build. If you’re already working through DPDP compliance, these milestones are the proof your app behaves correctly, and the audit is proof that it behaves safely under threats.

Who all need the ABDM Compliance? 

Any product that touches ABHA-linked data: 

  • EMRs and hospital management systems
  • Lab and pharmacy platforms, teleconsultation apps, and health lockers or PHR apps
  • Hospitals that buy ABDM-ready software also check this certification. 
The ABDM compliance path, from sandbox access to production credentials.
Fig 1: The ABDM compliance path, from sandbox access to production credentials.
MilestoneYour roleWhat NHA testsAudit exposure
M1Identity layerABHA creation, OTP verification, Scan and Share, linking to patient recordsOTP and login endpoints
M2HIP (provider)Consent validation, FHIR R4 bundle generation, encrypted data pushCallbacks, authorization, CORS
M3HIU (consumer)Consent requests, key exchange, decryption, bundle parsingKey handling, token storage, callback validation

Want faster ABDM certification for your healthcare setup?

character

The Checklist Before You Start 

Sorting these items out helps you start your milestone journey without any delays:

  • Registries: Register your facility on the Health Facility Registry (HFR) and your clinicians on the Healthcare Professionals Registry (HPR).
  • Sandbox access: Apply for sandbox credentials and store your client ID and secret in a secrets manager.
  • Environment separation: Keep sandbox and production credentials apart. Mixing them causes connection failures and inconsistent data after go-live.
  • Role decision: Read the ABDM guidelines for your role, then decide whether you’re a HIP, a HIU, or both before you design your data model.
  • Exit owner: Name one person for the sandbox exit paperwork, because missing documents can stall certification even after you pass the audit.

Node.js: config/abdm.js, a boot-time guard against sandbox and production mix-ups

const SANDBOX = "https://dev.abdm.gov.in/gateway";
const env  = process.env.APP_ENV;        // "staging" | "production"
const base = process.env.ABDM_GATEWAY_URL;
 
if (env === "production" && base === SANDBOX) {
  throw new Error("Production build is pointing at the ABDM sandbox gateway");
}
if (env !== "production" && base !== SANDBOX) {
  throw new Error("Non-production builds must use sandbox credentials only");
}
 
module.exports = {
  base,
  clientId: process.env.ABDM_CLIENT_ID,
  clientSecret: process.env.ABDM_CLIENT_SECRET,  // inject from your secrets manager
};

M1: ABHA Creation, Verification, and Linking

This is the foundation of ABDM compliance, and is rather easy on the outlook. 

You create an ABHA number, verify it with an OTP, and link it to a patient record. Most teams have a demo running within a week, which is exactly why they underestimate it. The real work sits in the edge cases that test scenarios probe.

•     Verification paths: Support Aadhaar OTP and mobile OTP, plus ABHA address creation.

•     Scan and Share: Accept a patient’s ABHA profile by QR code at registration.

•     Duplicate prevention: Search for an existing ABHA before you create one. Each person can hold only one.

•     Data matching: Validate name, date of birth, and gender against Aadhaar-linked details before you submit. Mismatches cause errors and duplicate attempts.

•     Linking: Map every ABHA to an internal patient ID, and block records that skip the mapping.

•     Request hygiene: Send a unique REQUEST-ID and a UTC ISO 8601 TIMESTAMP on every call, and refresh your session token before it expires.

Request hygiene is critical; don’t jaywalk through it. 

Imagine a team whose OTP flow passes every manual test, then breaks when two registrations arrive in the same second— a shared HTTP client was reusing one request ID, so the gateway treated the second call like a replay. The fix is small: build the headers inside the function that makes the call, and cache only the access token.

Node.js: per-call ABDM headers and a token cache that refreshes early (confirm paths against the current sandbox docs)

const axios = require("axios");
const { randomUUID } = require("crypto");
const abdm = require("./config/abdm");
 
let cached = { token: null, expiresAt: 0 };
 
async function getAccessToken() {
  // refresh 60s early
  if (Date.now() < cached.expiresAt - 60_000) return cached.token;
  const { data } = await axios.post(`${abdm.base}/v0.5/sessions`, {
clientId: abdm.clientId, clientSecret: abdm.clientSecret,
  });
  cached = { token: data.accessToken, expiresAt: Date.now() + data.expiresIn * 1000 };
  return cached.token;
}
 
async function abdmHeaders() {
  return {
Authorization: `Bearer ${await getAccessToken()}`,
    "REQUEST-ID": randomUUID(),        // new UUID per call, never cached
TIMESTAMP: new Date().toISOString(),   // UTC, ISO 8601
"X-CM-ID": process.env.ABDM_CM_ID, // "sbx" in the sandbox
  };
}

M2: Becoming a Health Information Provider (HIP)

M2 turns the page to the data concerns of ABDM compliance. When a patient grants consent, you need to ensure you serve the right records in an encrypted FHIR R4 bundle. 

  • Care contexts: Link each visit, report, or prescription to the patient’s ABHA as a care context.
  • Consent validation: Check the artefact’s status, purpose, date range, and expiry before you release anything.
  • FHIR bundles: Generate NRCES-profiled bundles, such as consultation notes, diagnostic reports, and prescriptions, that match the requested care contexts.
  • Callbacks: Acknowledge gateway requests within the required time, then push the encrypted bundle to the data-push URL in the request.
  • Audit trail: Log who requested what, when, and under which consent.

One detail here startles teams. According to a thread on ABDM’s developer forum, the gateway notifies HIPs of granted and revoked consents, but not expired ones. But your HIP has to enforce expiry too, as the ABDM guidelines put the duty to honor consent on you.

Node.js: refuse to serve data unless the consent is valid, unexpired, and in scope

function isConsentServable(artefact, request, now = new Date()) {
  const { dateRange, dataEraseAt } = artefact.permission;
  const inWindow  = now >= new Date(dateRange.from) && now <= new Date(dateRange.to);
  // the gateway won't notify you about expiry, so check it here
  const notErased = now < new Date(dataEraseAt);
  const allowed   = new Set(artefact.careContexts.map(c => c.careContextReference));
  const inScope   = request.careContexts.every(c => allowed.has(c));
  return artefact.status === "GRANTED" && inWindow && notErased && inScope;
}
 
// Filter by visit date too, so a valid consent never leaks out-of-range records.
const servable = records.filter(r =>
  r.visitDate >= artefact.permission.dateRange.from &&
  r.visitDate <= artefact.permission.dateRange.to);

Worried about passing your next ABDM compliance audit?

character

M3: Becoming a Health Information User (ABDM M3 Compliance)

ABDM M3 compliance flips the direction. Your system now asks another facility for records, and it must handle the full consent lifecycle: request, patient approval, artefact, then fetch. The rule behind ABDM M3 compliance is simple. No consent means no data access, and you must log when consent was given, what you accessed, and who accessed it.

Cryptography is another aspect where M3 gets hard. For every request, you generate a fresh ECDH key pair on Curve25519 and send the public key with a nonce in your data request. The HIP encrypts its bundle against that key, and you decrypt it on arrival.

  • Key material: Generate a new key pair and nonce per data request, and discard the private key once you decrypt.
  • Decryption: Derive the shared secret, then decrypt with AES-GCM exactly as the Fidelius specification describes.
  • Transfer window: Time-box every request and fail cleanly when data never arrives. The specs give the HIP a short window, so check the current version.
  • Bundle parsing: Tolerate profile variation, because records arrive from HIPs running different systems.
  • Consent logging: Store the consent ID, purpose, and access time for every fetch.

Picture a referral platform that fetches reports from three hospitals. Each hospital runs a different EMR, so one bundle omits an optional field that the others always include. 

A strict parser rejects the odd bundle, and the clinician sees a blank report. That is why you need to parse defensively, validate it against the FHIR profile, and log whatever is skipped.

Node.js: illustrative key exchange and decryption (use the Fidelius reference library in production)

const crypto = require("crypto");
const xor = (a, b) => Buffer.from(a.map((byte, i) => byte ^ b[i]));
 
// 1. Per-request key material: send the public key and nonce in the data request.
function newKeyMaterial() {
  const { publicKey, privateKey } = crypto.generateKeyPairSync("x25519");
  return { publicKey, privateKey, nonce: crypto.randomBytes(32) };
}
 
// 2. Decrypt the pushed bundle (derivation details: see the Fidelius spec).
function decryptBundle({ cipherB64, senderPublicKey, senderNonce }, mine) {
  const shared = crypto.diffieHellman({
privateKey: mine.privateKey, publicKey: senderPublicKey });
  const salt   = xor(mine.nonce, senderNonce);
  const key = Buffer.from(crypto.hkdfSync(
"sha256", shared, salt.subarray(0, 20), "", 32));
  const iv = salt.subarray(salt.length - 12);
  const data   = Buffer.from(cipherB64, "base64");
  const d = crypto.createDecipheriv("aes-256-gcm", key, iv);
  d.setAuthTag(data.subarray(data.length - 16));
  return Buffer.concat([d.update(data.subarray(0, data.length - 16)), d.final()]);
}

This snippet is more of a map than just a production code. ABDM publishes Fidelius as a reference implementation so you don’t hand-roll the cryptography.

Where WASA Meets M1 to M3

Clearing the ABDM milestones earns you functional approval, not production keys. 

NHA requires a Web Application Security Audit, via a CERT-In empaneled auditor. Here, ISO 27001, HIPAA, and internal pentest reports don’t substitute, and neither does STQC, which certifies Aadhaar-related systems. 

Our guide to the ABHA Web Application Security Certificate walks through the five-step journey, and our WASA audit explainer covers the methodology.

To touch briefly, here the audit tests the endpoints each milestone added to your attack surface. We highlight a few findings that block teams below: 

  • Weak session handling
  • Thin rate limiting on health-data endpoints
  • Improper validation of callback payloads
  • Error messages that leak infrastructure details.
MilestoneEndpoints addedTypical findingsFix to build in
M1OTP, login, ABHA linkingNo rate limiting; user enumeration through differing error messagesThrottle attempts; return one uniform error
M2HIP request callbacks, data pushBroken authorization on care contexts; permissive CORSConsent check on every request; origin allowlist
M3Consent requests, transfer callbacksToken storage flaws; weak key handling; unvalidated callbacksSecrets manager; Fidelius library; verify gateway tokens

Auditors refer to OWASP Top 10 and the OWASP API Top 10 vulnerabilities, so one middleware stack can close several findings at once. The snippet below helps set security headers, an explicit CORS allowlist, and rate limits, then authenticates the gateway’s callbacks.

Node.js (Express): headers, CORS allowlist, rate limits, and gateway-token verification

const helmet = require("helmet");
const cors = require("cors");
const rateLimit = require("express-rate-limit");
const { createRemoteJWKSet, jwtVerify } = require("jose");
 
const ALLOWED = [
  "https://app.example-hospital.in", "https://admin.example-hospital.in"];
 
app.use(helmet({ contentSecurityPolicy: { directives: {
  defaultSrc: ["'self'"], frameAncestors: ["'none'"] } } }));
 
app.use(cors({
  origin: (o, cb) => (!o || ALLOWED.includes(o))
? cb(null, true) : cb(new Error("Origin not allowed")),
  credentials: true,   // safe only with an explicit, never-reflected list
}));
 
app.use("/auth", rateLimit({
  windowMs: 15 * 60 * 1000, max: 5, standardHeaders: true }));
 
// Reject callbacks without a valid gateway-signed token (confirm the certs path in the docs).
const jwks = createRemoteJWKSet(
  new URL(`${process.env.ABDM_GATEWAY_URL}/v0.5/certs`));
app.use("/abdm/callbacks", async (req, res, next) => {
  try {
await jwtVerify((req.headers.authorization || "").replace("Bearer ", ""), jwks);
next();
  } catch { res.status(401).json({ error: "Invalid gateway token" }); }
});

When the report arrives, you must fix every Critical and High finding before the auditor comes and re-scans. Secondly, budget that fix-and-re-scan loop into your launch plan from day one, and thirdly, book your auditor early, because good ones have a lengthy waiting list!

Lastly, choose your auditor with the same thought you’d give to a senior hire. Ask three questions before you sign:

•  Have you audited ABDM-integrated platforms, including HIP, HIU, and consent flows, before?

•  Do you test the OWASP API Top 10 alongside web vulnerabilities, since ABDM integrations are API-heavy?

•  What remediation support and re-scan turnaround do you offer after the first report?

Run These Checks Before the Auditor Does

Three commands catch the most common findings in under ten minutes. Run them against your staging URL, and fix anything that doesn’t behave as the comments describe.

Bash: CORS, rate limiting, and security headers

# 1. CORS: a hostile origin should NOT get an Access-Control-Allow-Origin header back
curl -s -I -H "Origin: https://evil.example" \
  https://staging.yourapp.in/api/users | grep -i access-control
 
# 2. Rate limiting: after 8 bad logins, expect HTTP 429 before the last attempt
for i in $(seq 1 8); do
  curl -s -o /dev/null -w "%{http_code}\n" -X POST \
    https://staging.yourapp.in/auth/login \
-H "Content-Type: application/json" -d '{"email":"[email protected]","password":"wrong"}'
done
 
# 3. Security headers: expect CSP, frame protection, nosniff, and HSTS
curl -s -I https://staging.yourapp.in \
  | grep -i -E "content-security|x-frame|x-content-type|strict-transport"

ABDM Compliance Go-Live Checklist

Paste this ABDM compliance checklist into your sprint board and tick it off ASAP:

•     HFR and HPR registrations are complete.

•     Sandbox and production credentials live in separate environments.

•     M1: ABHA creation, verification, Scan and Share, and linking pass NHA’s test cases.

•     M2: consent validation, FHIR bundles, and encrypted data push work end to end.

•     M3: key exchange, decryption, and consent logging work end to end.

•     Every gateway callback is authenticated and acknowledged on time.

•     CORS allowlist, rate limits, and security headers are in place.

•     WASA is complete with zero open Critical or High findings, and you hold the Safe-to-Host certificate.

•     Exit documents are versioned and match the exact build the auditor tested.

•     Front-desk and clinical staff know how to create ABHA numbers and request consent.

Building a health app and need ABDM certification ?

character

Final Thoughts

ABDM compliance works best when you treat the ABDM milestones and the audit as one pipeline, and ABDM certification follows naturally from that habit. Build consent checks, encryption, and rate limits while you write the integration, so your audit looks less like a first-hand discovery report. 

If you’d like a CERT-In empaneled team to pressure-test your integration before the formal audit, Astra’s team works with healthcare products at exactly this stage. You can also read how our VAPT certification exactly fits into the ABDM journey.

Ready to get ABDM certified and scale with confidence?Get a Pentest  →

FAQs

What are the ABDM milestones?

M1 covers ABHA creation and linking. M2 makes you a Health Information Provider that shares records. M3 makes you a Health Information User that retrieves them. Consent governs both M2 and M3.

What are the ABDM milestones?

M1 covers ABHA creation and linking. M2 makes you a Health Information Provider that shares records. M3 makes you a Health Information User that retrieves them. Consent governs both M2 and M3.

What are the ABDM milestones?

M1 covers ABHA creation and linking. M2 makes you a Health Information Provider that shares records. M3 makes you a Health Information User that retrieves them. Consent governs both M2 and M3.

What are the ABDM milestones?

M1 covers ABHA creation and linking. M2 makes you a Health Information Provider that shares records. M3 makes you a Health Information User that retrieves them. Consent governs both M2 and M3.

What is the ABDM compliance checklist?

• HFR and HPR registrations are complete.
• Sandbox and production credentials live in separate environments.
• M1: ABHA creation, verification, Scan and Share, and linking pass NHA’s test cases.
• M2: consent validation, FHIR bundles, and encrypted data push work end to end.
• M3: key exchange, decryption, and consent logging work end to end.
• Every gateway callback is authenticated and acknowledged on time.
• CORS allowlist, rate limits, and security headers are in place.
• WASA is complete with zero open Critical or High findings, and you hold the Safe-to-Host certificate.
• Exit documents are versioned and match the exact build the auditor tested.
• Front-desk and clinical staff know how to create ABHA numbers and request consent.

Is ABDM certification mandatory?

Not for everyone yet. It’s already required for categories like AB-PMJAY empaneled hospitals, AIIMS, and NMC-linked institutions, and adoption is expanding. Check your segment’s current requirement.