A bank account verification API takes an account number and an IFSC and tells you whether that account exists and, if you supply a name, how closely it matches the name held by the bank. In India this is usually called penny drop, after the original technique of sending a rupee to the account and reading back what the bank returned. With StampMitra you make one POST to /v1/verify/bank-account with accountNumber and ifsc, optionally add the beneficiary name and the account holder's phone, and get back the account status, the name at the bank, a name match result and score, branch and IFSC details, and a referenceId for your records.
This page is written for the developer who has to wire the check into a payout flow or a vendor onboarding form, and for the compliance or finance lead who has to decide what a "match" means. It covers what the check does, every field in the response, how to read the name match, when a call is billed, why checks fail, a worked integration in cURL, Node.js and Python, how to gate payouts on the result, how to combine the check with PAN and GSTIN, edge cases that real data throws up, audit logging, a cost model, sandbox versus production, privacy in general terms, and a go-live checklist.
Everything about request fields, response fields, errors and billing below is taken from the StampMitra API reference for this product. Where the reference does not say something, this page says so instead of guessing. It is general information, not legal advice.
Key takeaways
- Endpoint:
POST https://api-b2b.stampmitra.in/v1/verify/bank-account. Scope:verification.bank-account.read. Required fields:accountNumber(9 to 18 digits) andifsc(11 characters). Optional:nameandphone. - The response gives you
accountStatus,nameAtBank,nameMatchResult,nameMatchScore, bank, branch, city, MICR and a nestedifscDetailsobject, plus autrand the StampMitrareferenceId. - Pass
namewhenever you have one. Without it you learn that an account exists but not whether it belongs to the person you think it does. - A negative result (account not valid) is still a completed, billable verification. A malformed account number or IFSC is rejected with a
400before anything is submitted and is not billed. - Gate payouts on the combination of account status and name match, and send borderline matches to a person instead of auto-rejecting them.
- Store the
referenceId, the decision and the timestamp. KeepnameAtBankand the account number out of application logs. - Sandbox is free and never debits your wallet, but it returns sample data. Use it to test plumbing and error handling, not to tune your name-match thresholds.
What does bank account verification actually check?
When a business pays a vendor, a gig worker, a seller or a refund beneficiary, the account details come from a form someone typed. Typos, an old account, a closed branch, a transposed digit or an account that belongs to someone else all look the same on the screen. The money moves anyway, and getting it back costs more than the check would have.
Verification answers three separate questions, and it helps to keep them apart because they fail independently.
- Does this account number exist at this IFSC? An account number is only meaningful together with a branch, so the check always works on the pair.
- Is the account in a state that can receive money? An account can exist and still be closed, frozen or dormant.
- Does the name on the account match the person or business you expect? This is the question that stops a payout going to the wrong party, and it is the one that needs your input, because only you know whom you intended to pay.
The older technique that gave the category its name is the penny drop. A small credit is sent to the account number through a real-time payment rail, and the bank's response for that credit reveals whether the account accepted it and, in many implementations, the beneficiary name. It works because the bank itself decides whether the credit lands.
StampMitra's reference for this endpoint does not describe the upstream method, so this page will not claim a particular rail or a rupee amount. What the response does show is a utr field, which is the kind of reference a bank transfer produces, together with an account status and a name at the bank. Treat those as the observable contract. If your finance team needs to know exactly how the check is performed, for example for an internal control document, ask StampMitra support and record the answer, rather than inferring it from this page.
What a positive result does not prove
A matching account proves that the account exists and that its holder name resembles the name you supplied. It does not prove that the person submitting the form controls the account, that the account is the right one for the transaction, or that the holder is who they say they are. Account-holder verification is one input into your onboarding decision, alongside identity and business checks, not a substitute for them. The section on combining checks shows how to line these up.
How the request and response work
The contract is small enough to show in full. These facts come from the Bank Account entry in the API reference.
| Property | Value |
|---|---|
| Method and path | POST /v1/verify/bank-account |
| Base URL | https://api-b2b.stampmitra.in |
| Authentication | Authorization: Bearer <api-key>, or the x-api-key header |
| Scope | verification.bank-account.read |
| Metered as | bank-account.verify, recorded after a successful response |
| Production price | ₹4 per completed call, excluding GST |
The request
curl -X POST "https://api-b2b.stampmitra.in/v1/verify/bank-account" \
-H "Authorization: Bearer $STAMPMITRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountNumber": "000123456789",
"ifsc": "ICIC0001234",
"name": "Ravi Kumar",
"phone": "9876543210"
}'Two choices here deserve a comment. First, accountNumber is a string on purpose. Many Indian account numbers begin with zeros, and a number type will silently drop them, producing a valid-looking but wrong account. Second, name is optional in the schema but should be treated as required in your own product. Without it the call can tell you that an account is valid, but nothing about whose it is.
Request and response reference
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. |
accountNumberrequired | string | 9-18 digit numeric bank account number. |
ifscrequired | string | 11-character IFSC code, e.g. ICIC0001234. |
name | string | Beneficiary name to match. |
phone | string | Account holder's 10-digit Indian mobile number, when available; improves match confidence. |
Response fields
| Field | Type |
|---|---|
referenceId | string |
valid | boolean |
nameAtBank | string |
bankName | string |
utr | string |
city | string |
branch | string |
micr | string |
nameMatchScore | string |
nameMatchResult | string |
accountStatus | string |
accountStatusCode | string |
ifscDetails | object |
Field by field
referenceId is StampMitra's own transaction identifier, in the format SMV-YYYYMMDD-XXXXXXX. It is present on every completed call, including a negative one. It is not an idempotency key. Use it as the join key between your records and ours when something needs investigating.
valid is the top-level boolean. It is the shortest summary of whether the account check succeeded, and a good first branch in your code, but it should not be the only thing you read.
accountStatus and accountStatusCode carry the account's state as a label and a code. The example shows ACCOUNT_IS_VALID and 1. The reference documents only that example, so write your handling as an allow-list: accept the value you have seen and know to be good, and route every other value to review, rather than guessing that anything unfamiliar means failure or success.
nameAtBank is the name the bank holds for the account, upper-case in the example. It is personal data. You compare it with your expected name, and you normally do not need to keep it afterwards.
nameMatchScore and nameMatchResult are StampMitra's comparison of your supplied name with nameAtBank. The score is returned as a string, "100" in the example, so parse it before comparing. The result is a label, GOOD_MATCH in the example. How to use these is the subject of the next section.
bankName, branch, city and micr describe where the account is held. ifscDetails repeats the bank, IFSC and MICR and adds the branch address and state. These are useful for display ("Paying to ICICI Bank, Andheri West") and for catching an IFSC that was typed for the wrong bank, which shows up as a bank name that surprises the user.
utr is the unique transaction reference the check produced. Keep it with the referenceId if you ever need to explain a particular check to your bank or to us.
How to read the name match
Names in bank records are messier than names in your own database. A bank may store RAVI KUMAR, your form may have Ravi K. Sharma, the account may be in a married name, and a business account will carry a legal name rather than the trade name on your invoice. A name match is therefore a score with a gray zone, not a yes or no.
Three bands, not two
The most reliable pattern is to map the returned result into three actions.
| Band | Typical signal | Action |
|---|---|---|
| Clear match | nameMatchResult is GOOD_MATCH and the score is high | Release the payout or mark the beneficiary verified |
| Unclear | A lower score, or a result label you have not seen before | Hold and send to a human with both names on screen |
| Clear mismatch | A very low score, or valid is false | Reject and ask the user to re-enter or supply a bank proof |
The reference documents GOOD_MATCH and a score of "100" and does not publish the full list of labels or a score scale for the other bands. Do not invent thresholds from the example. Instead, run your own sample through the production endpoint during pilot, look at the distribution of real scores against real outcomes, and set the "unclear" band from evidence. Record the thresholds you chose and the date, because an auditor will ask.
Why a mismatch is not always fraud
The common innocent causes are initials versus full names, a different order of given name and surname, honorifics, a spelling variation introduced by transliterating from Hindi or another Indian language into English, and a business paying into a proprietor's personal account. Treat a low score as a reason to look, not as proof of wrongdoing. The mistake to avoid is automatically telling a legitimate vendor they are suspected of fraud because their middle name was abbreviated.
Pass the name you would put on the payment
If you are going to pay Ravi Kumar Sharma, send exactly that, not a nickname. If the beneficiary is a company, send the registered name. The PAN and GSTIN checks return registered and legal names, which you can feed straight into this call; the combining-checks section below shows how.
When is a call billed?
Billing for this endpoint follows the rules that apply to all StampMitra verification endpoints.
- The call is metered as
bank-account.verifyand usage is recorded only after the verification completes successfully. In production the wallet is debited at that point. - A negative determination is a completed verification. If the answer is that the account is not valid, you still got an answer, the call is recorded and billed, and you receive a
referenceId. - A request that fails validation, authentication or authorisation does not complete a verification. A malformed
accountNumberorifscreturns400, a bad key returns401, a missing scope returns403, and none of these is billed. - If the upstream verification service cannot be reached, the endpoint returns
502 INTERNAL_ERROR. No verification completed, so no completed-call charge applies. Retry with backoff. - Sandbox calls never debit your wallet.
- A production call needs enough wallet balance to cover it. If the balance is short, the response is
402 PAYMENT_REQUIRED, and the fix is to top up, not to retry.
The practical lesson is to validate on your side first. Checking that the account number is digits and the right length, and that the IFSC has the right shape, costs nothing and keeps typos from reaching the API. Failed-validation calls are free, but they still use rate limit and add noise to your logs.
Rates are published on the pricing page excluding 18% GST. Top-ups to the wallet are invoiced with GST like any other charge, so reconcile on the invoice amount, not the per-call price alone.
Why verification fails
Not every unsuccessful check means the same thing, and your product should tell the user which kind they hit. Failures fall into groups.
The request never reached verification
400 BAD_REQUEST: the account number is not a 9 to 18 digit numeric string, or the IFSC is malformed. The message names the field. Show it to the user.401 UNAUTHORIZED: missing or invalid key. A deployment problem, not a user problem.403 FORBIDDEN: valid key, missingverification.bank-account.readscope. Another configuration bug.402 PAYMENT_REQUIRED: wallet balance too low in production. An operations alert, never a user-facing error.429 TOO_MANY_REQUESTS: you exceeded the endpoint rate limit. The documented example message reads "Rate limit exceeded: 60 requests per 60 seconds for this endpoint." In sandbox a429can also be a sandbox limit (10 a minute or 200 a day per organisation; codeSANDBOX_RATE_LIMIT,SANDBOX_DAILY_LIMITorSANDBOX_IP_LIMIT).502 INTERNAL_ERROR: the verification service behind StampMitra could not be reached. Transient. Retry with backoff.
The check completed with a negative answer
- The account number and IFSC do not correspond to an account. Most often a typo, the wrong IFSC for the right account, or a closed account.
- The account exists but is not able to receive credits, for reasons such as closure or restrictions. Which reason applies is not exposed beyond
accountStatus. - The check completed but the name does not match.
validmay be true whilenameMatchResultis not a good match, which is exactly why you read both.
Environmental causes you cannot see
Banks have maintenance windows, and individual bank systems can be slow or unavailable for periods. When a particular bank's responses are failing, you will see it as clusters of 502 for accounts at that bank. Build alerting by bank code (the first four characters of the IFSC) so operations can spot it.
400Validation errorBAD_REQUESTaccountNumber must be a 9-18 digit numeric bank account number
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
Integration walkthrough
A production-worthy call has four parts: normalise the input, validate it locally, call the API with a timeout, and translate the result into a decision your system can act on.
Normalise and validate before calling
Strip spaces and hyphens from the account number, upper-case and trim the IFSC, and reject obvious problems immediately. An IFSC is 11 characters: four letters that identify the bank, a zero in the fifth position that is reserved, and six characters that identify the branch. That structure lets you catch most typos without a network call.
export function normaliseBankInput({ accountNumber, ifsc }) {
return {
accountNumber: String(accountNumber).replace(/[\s-]/g, ""),
ifsc: String(ifsc).trim().toUpperCase(),
};
}
export function localBankInputProblem({ accountNumber, ifsc }) {
if (!/^\d{9,18}$/.test(accountNumber)) return "Account number must be 9 to 18 digits.";
if (!/^[A-Z]{4}0[A-Z0-9]{6}$/.test(ifsc)) return "IFSC must be 11 characters, such as ICIC0001234.";
return null;
}Node.js
If you prefer a client library, the Node.js SDK and Python SDK wrap the same endpoint. The raw calls below show what they do.
// Node 18+ (built-in fetch)
const BASE = "https://api-b2b.stampmitra.in";
export async function verifyBankAccount(input, { timeoutMs = 20000 } = {}) {
const clean = normaliseBankInput(input);
const problem = localBankInputProblem(clean);
if (problem) return { kind: "invalid_input", message: problem };
const res = await fetch(`${BASE}/v1/verify/bank-account`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
...clean,
...(input.name ? { name: input.name } : {}),
...(input.phone ? { phone: input.phone } : {}),
}),
signal: AbortSignal.timeout(timeoutMs),
});
const body = await res.json().catch(() => ({}));
if (res.ok) return { kind: "completed", result: body };
const { code, message, requestId } = body.error ?? {};
const retryable = res.status === 429 || res.status === 502;
return { kind: retryable ? "retry" : "failed", status: res.status, code, message, requestId };
}Python
import os
import re
import requests
BASE = "https://api-b2b.stampmitra.in"
def verify_bank_account(account_number, ifsc, name=None, phone=None, timeout=20):
account_number = re.sub(r"[\s-]", "", str(account_number))
ifsc = str(ifsc).strip().upper()
if not re.fullmatch(r"\d{9,18}", account_number):
return {"kind": "invalid_input", "message": "Account number must be 9 to 18 digits."}
if not re.fullmatch(r"[A-Z]{4}0[A-Z0-9]{6}", ifsc):
return {"kind": "invalid_input", "message": "IFSC must be 11 characters, such as ICIC0001234."}
payload = {"accountNumber": account_number, "ifsc": ifsc}
if name:
payload["name"] = name
if phone:
payload["phone"] = phone
resp = requests.post(
f"{BASE}/v1/verify/bank-account",
headers={"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}"},
json=payload,
timeout=timeout,
)
body = resp.json() if resp.content else {}
if resp.ok:
return {"kind": "completed", "result": body}
err = body.get("error", {})
retryable = resp.status_code in (429, 502)
return {
"kind": "retry" if retryable else "failed",
"status": resp.status_code,
"code": err.get("code"),
"message": err.get("message"),
"requestId": err.get("requestId"),
}Both functions return a small tagged result instead of throwing, which keeps the call site honest about the four outcomes: input rejected locally, completed, retry later, and failed for a reason a human has to fix. Both surface the requestId from the error envelope. Log that, not the request body.
Retries and timeouts
The reference states that referenceId is not an idempotency key and documents no idempotency header on this route. If a request times out, you cannot know whether the call completed and was billed. Design for that: retry only on 429 and 502, use exponential backoff with jitter, cap the attempts at two or three, and treat a repeated call as possibly billed twice. For a payout flow, the cleaner pattern is to key your own record on (beneficiaryId, accountNumber hash, ifsc) and reuse a recent completed result instead of calling again.
Turning the response into a decision
export function decideBeneficiary(result, { minGoodScore = 90 } = {}) {
const score = Number(result.nameMatchScore);
const accountOk = result.valid === true && result.accountStatus === "ACCOUNT_IS_VALID";
if (!accountOk) return { action: "reject", reason: "account_not_valid", referenceId: result.referenceId };
if (result.nameMatchResult === "GOOD_MATCH" && score >= minGoodScore) {
return { action: "approve", referenceId: result.referenceId };
}
return { action: "review", reason: "name_unclear", referenceId: result.referenceId };
}The threshold minGoodScore is a placeholder for the value you decide on during pilot. The function deliberately has no automatic reject for a weak name match. Everything that is not a clear pass or a clear account failure goes to a person.
Verification before payouts
Payouts are where an unverified account does the most damage, so it is the most common place to put this check. There are two designs, and the right one depends on your volume.
Verify at beneficiary creation. When a vendor, driver or seller adds a bank account, run the check once, store the decision against the beneficiary, and allow payouts only to beneficiaries in an approved state. This is cheap, because you pay once per account rather than once per payment, and it moves friction to the moment the user is already filling a form.
Verify at payout time. Re-run the check immediately before each payment, or before payments above a limit. This catches an account that was closed since onboarding and defends against someone swapping the account details in your system. It costs a call per payout.
Most teams combine them: verify at creation, then re-verify when the account details change, when a beneficiary has been dormant for a long time, or when a single payout is unusually large relative to history.
A state machine for beneficiaries
Model the beneficiary, not the call. Useful states are unverified, pending_review, verified, rejected and stale. Moving from unverified to verified requires an approve decision, and any edit to the account number or IFSC resets the state to unverified. Payout code should refuse any beneficiary that is not verified, and that rule should live in the payout service itself, not only in the UI, so a script or an admin tool cannot bypass it.
Refunds and reversals
Refund beneficiaries are the quiet source of misdirected money, because the destination account is typed by a customer in a hurry. If you refund to a bank account rather than the original payment instrument, run the same check on the account and name before sending it.
Combining bank account checks with PAN and GSTIN
Bank verification is strongest as one step in a sequence, because each step gives you a name you can compare with the next.
For an individual vendor or freelancer, verify the PAN first. The PAN verification API returns the registered name for the PAN, and you can pass name to get a match result. Then verify the bank account using that registered name as the name input. If the bank holds the same person under a compatible name, you have a consistent identity across two independent records. Mismatches between PAN name and bank name are the single most useful signal for a human reviewer.
For a business vendor, verify the GSTIN with the GSTIN verification API. It returns the legalName and tradeName, and the GSTIN embeds the PAN of the entity in characters 3 to 12, which you can cross-check against a PAN you collected separately. Then verify the account with the legal name. A business paying into a proprietor's personal account is common for small firms, so decide in advance whether you accept that, and require extra documentation when you do.
The order matters for cost as well as logic. The checks have different price points, with the bank account call priced separately from the standard PAN and GSTIN calls, so run the cheapest and most decisive check first and stop on a failure. If the PAN is invalid there is no point verifying the account.
A worked onboarding sequence
A fictional marketplace, TrunkLine, onboards delivery partners and pays them weekly.
- The partner enters PAN, bank account number, IFSC and name.
- TrunkLine's backend calls PAN verification with the entered name. If the PAN is invalid or the name match is clear mismatch, onboarding stops with a message asking for correction.
- It then calls bank account verification, passing the PAN-registered name rather than what the user typed, and the partner's mobile number.
- A clear match on both marks the partner
verifiedand enables weekly payouts. - If the PAN is valid but the bank name is unclear, the partner moves to
pending_review. A reviewer sees the PAN name, the name at the bank and the score side by side, and approves or rejects with a reason. - TrunkLine stores both
referenceIdvalues, the decision, the reviewer and the timestamps. It does not store the name at the bank.
The result is an audit trail that answers "why did you pay this account?" with two reference IDs and a recorded human decision when there was doubt.
Edge cases and odd inputs
Real data does not look like the documentation example. These are the situations worth testing before go-live.
- Leading zeros.
000123456789is a different account from123456789. Keep the value as a string from the form to the API. - Spaces and hyphens in pasted numbers. Strip them before validation. Customers paste from bank statements and SMS alerts.
- Account number length. Lengths differ across banks and the API accepts 9 to 18 digits. Do not impose a stricter rule of your own.
- IFSC in lower case or with a trailing space. Normalise before validating. An IFSC with the letter O where the reserved zero belongs is a classic typo, and the local pattern above rejects it.
- IFSC changes after bank mergers. When banks merge, branch codes change and customers keep quoting the old IFSC from an old cheque book. A negative result on an older account can simply be an outdated IFSC. Ask the user for the current one from their bank app or statement.
- Joint accounts. The name at the bank may be one holder, or both. A match to either holder can be correct. Decide in advance whether a payout to a joint account in someone else's first name is acceptable.
- Business accounts. Expect the legal name, often longer than the trade name and carrying
PRIVATE LIMITED,LLPor a proprietor's name. Match on the registered name from the GSTIN or PAN response. - Minors, guardians and HUF accounts. The name at the bank may be the guardian or the family entity rather than the individual. This will show up as a mismatch and needs a documented exception path.
- Name order and transliteration.
SHARMA RAVI KUMARandRAVI KUMAR SHARMAare the same person. The score handles some of this, but not all of it, so keep the gray-zone review. - NRE, NRO and other special account types. The reference does not state which account types are covered. If you serve non-resident customers, test those accounts in a pilot and ask support before assuming coverage.
- Very recent accounts. An account opened minutes ago may not be reachable by the check yet. A single negative on a brand-new account is a reason to retry later, not to reject permanently.
- Wallets and UPI handles. This endpoint verifies bank accounts by number and IFSC. A UPI ID or a prepaid wallet is a different instrument, and you should not feed a wallet number into it.
Audit logging and monitoring
Verification output is evidence. If a payout is later disputed, you need to show what you checked, when, and what you decided. At the same time, the output contains personal data you should not scatter across log files.
Log these: your own beneficiary ID, the referenceId, the utr, the decision (approve, review, reject), the reason code, the match score, the thresholds in force, the bank code (first four characters of the IFSC), the HTTP status, the requestId for errors, and a timestamp. These identify the check without exposing the person.
Do not log: the full account number, nameAtBank, the phone number, or the raw response body. If you must keep the account number for debugging, keep a keyed hash or the last four digits.
StampMitra keeps request logs you can read with the GET /v1/logs endpoint or the dashboard. Retention depends on your plan: the pricing catalogue lists shorter retention on lower plans and up to 365 days on Scale. Use those logs to investigate, and keep your own decision records for as long as your audit needs require, since your retention obligations are yours to decide.
Metrics to watch
- Verifications per day and the share that end in each action. A sudden rise in
reviewoften means a form change or a new batch of unusual data. - Median and 95th percentile response time per bank code. A single bank degrading shows up here first.
402count, which should be zero. A single one means a wallet ran dry in production and payouts are about to stall.429count against your plan's request limit.- The ratio of calls billed to payouts released. A creeping ratio means beneficiaries are being re-verified more than your policy intends.
Modelling the cost
Verification cost scales with how many accounts you check, not with how many payments you make, provided you verify at beneficiary creation. The cost model is short.
export function monthlyBankVerificationCost({
newBeneficiaries, // accounts added in the month
retryShare = 0.15, // share that need a second attempt after a typo or a failed check
reverifyShare = 0.05, // share of existing accounts you re-check (edits, dormancy)
existingBeneficiaries = 0,
pricePerCall, // from your plan, see the pricing page
}) {
const calls = newBeneficiaries * (1 + retryShare) + existingBeneficiaries * reverifyShare;
return { calls: Math.ceil(calls), cost: Math.ceil(calls) * pricePerCall };
}Take a business that adds 800 beneficiaries a month, has 6,000 existing ones, expects 15 percent to need a retry and re-verifies 5 percent of existing accounts. That is 920 calls for new accounts and 300 for re-checks, 1,220 calls in total. Multiply by the per-call rate on your plan, and add 18% GST to the wallet top-up, to get the monthly cost. The inputs that move the number most are the retry share, which falls when your form validates locally and shows the bank name back to the user, and the re-verify policy, which is a business choice rather than a technical one.
Compare that cost with the thing it prevents. One misdirected payout of a typical size can exceed the month's verification spend, and the recovery effort has its own cost in staff time. The aim of the model is not to minimise calls but to make sure each call buys a decision.
Wallet balance is the operational risk. Set an alert on balance as a number of days of average spend, not as a fixed rupee figure, so the alert scales with your volume.
Sandbox and production
A sandbox key starts with sk_test_ and is issued when you sign up; the quickstart shows the first call end to end. A production key starts with sk_live_ and is created only after your organisation's KYC and a production application for the product are approved. The environment is resolved on the server from the key, so the request you test is the same request you run live.
What sandbox is good for:
- Proving authentication, scope and headers.
- Exercising your error handling for
400,401,403,429and the response parsing. - Building the UI states: verified, under review, rejected.
- Writing automated tests, using stored responses for unit tests so only a few integration tests call the network.
What sandbox is not good for:
- Tuning name-match thresholds. Sandbox returns sample data, every name in a sandbox reply is synthetic, and the same input always gives the same answer. Your thresholds need real names.
- Capacity planning. Sandbox limits are not production limits.
- Estimating the share of accounts that fail. Sandbox returns an arbitrary outcome for most inputs, roughly two in three valid.
The sandbox test-value list includes magic inputs for bank accounts: SANDBOX0000000001 for a valid account and SANDBOX9999999999 for an invalid one. Those values are not 9 to 18 digit numeric strings, and this endpoint validates the account number format before anything else, so confirm in your own sandbox account how those values behave before building tests around them. For ordinary numeric account numbers, expect a stable but arbitrary outcome.
Sandbox calls never debit the wallet. Going over a sandbox limit (10 a minute, 200 a day per organisation) or a rate limit returns 429. For going live, apply for production access for the Bank Account product from the dashboard with a specific description of your use case, create an sk_live_ key, fund the wallet, and swap the key in your secrets manager.
Restrict the key
Bank account details are sensitive financial data. Give the key only the scopes the service needs (the authentication docs explain both headers and scopes), here verification.bank-account.read, and use a separate key per service. Restricting a key to your servers' IP addresses is available on the plans that include an IP allowlist, and you should turn it on for any key that can read bank data. Never call this endpoint from a browser or a mobile app, because the key would be exposed to anyone who opens the network tab.
Privacy and consent, in general terms
Bank details and the name on an account are personal and financial information. Indian data protection law, the Digital Personal Data Protection Act, 2023, and its rules govern how organisations collect and process personal data, and your lawyers should tell you precisely what applies to you. What follows is the general practice that most compliance teams expect, not legal advice.
- Tell the person what you are doing. At the point you collect the bank details, say that you will verify them with a verification service, why, and what you will keep.
- Use the data for the stated purpose. Account verification for paying the vendor is one purpose. Using the same data for marketing is another.
- Collect only what you need. The
phonefield is optional. If you do not already hold the account holder's number for a legitimate reason, do not collect one just to improve a match score. - Keep the minimum. Store the decision, the reference IDs and the timestamp. You rarely need to keep
nameAtBankafter the comparison. - Set a retention period and delete or anonymise on schedule.
- Limit who can see the data. Reviewers need to see the account and the name to do their job. Most engineers do not.
- Handle a person's request properly. Have a route for someone to ask what you hold about them, to correct it, or to withdraw their consent where that applies.
- Use a service provider arrangement. StampMitra processes your verification requests on your behalf. Agree the terms with us in the way your counsel advises.
Production checklist
- The key has only
verification.bank-account.read, is stored in a secrets manager, and is restricted by IP where your plan allows. - Input is normalised and validated locally; the account number travels as a string.
nameis always sent when you have one;phoneonly when you legitimately hold it.- The response is handled as an allow-list for
accountStatusandnameMatchResult; unknown values go to review. - Thresholds were set from real production data in a pilot and are written down with a date.
- Retries only on
429and502, with backoff, a cap and a timeout; no retry loop on4xx. - Payout code refuses unverified beneficiaries inside the payout service.
- Logs hold reference IDs and decisions, not names or full account numbers.
- Wallet-balance and
402alerts exist, sized in days of spend. - A human review queue exists for the unclear band, with a written policy and an owner.
- A privacy notice and retention schedule cover the data.
- You have tested a closed account, a wrong IFSC, a joint account, an abbreviated name and an account with leading zeros.
Common mistakes
- Sending the account number as a number. Leading zeros vanish and you verify a different account.
- Treating
valid: trueas a name match. An account can be valid and belong to someone else. Always read the match result. - Auto-rejecting low scores. Legitimate people have initials and transliterations. Route the gray zone to a reviewer.
- Tuning thresholds in sandbox. The names are synthetic.
- Calling from the browser. It exposes the key and breaks your IP allowlist.
- Retrying every failure. A
400or403will never succeed on retry, and retrying a429immediately makes it worse. - Logging the response. The log file becomes a store of names and accounts that nobody planned to protect.
- Verifying once and paying forever. Accounts close and details change. Re-verify when they do.
- Ignoring the IFSC. A typo in the IFSC looks identical to a bad account. Show the returned bank and branch back to the user so they can spot it.
What to read next
The check is most useful alongside identity and business checks: the PAN verification API for the individual, the GSTIN verification API for the business, and the business verification guide for CIN and Udyam. For key handling and the move to production, see sandbox vs production API keys and API errors and handling. The complete endpoint reference is in the Bank Account API docs, and the KYC API for fintech and NBFC use case shows the check inside a wider onboarding flow.
Sources
- Bank Account API reference, StampMitra product data: request fields, response example, scope and validation message, checked October 2026.
- Pricing, StampMitra: per-call rates, plan limits and log retention, checked October 2026. Rates exclude 18% GST.
- Digital Personal Data Protection Act, 2023, Government of India. Read the current Act and the rules made under it on the official government sites.
- Reserve Bank of India and NPCI publications on IFSC and real-time payment systems, for the structure of an IFSC and how bank transfers are referenced. Check the current documentation.
Sandbox test values
Send one of these values as accountNumber 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. Send with it: ifsc: SNDB0000001, name: Ravi Kumar. 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 |
|---|---|---|
| Valid account | 900000000001 | 200 |
| Account not found / invalid | 900000000002 | 200 |
| Name does not match | 900000000003 | 200 |
| Verification source times out | 900000000005 | 502INTERNAL_ERROR |
| Verification source unavailable | 900000000006 | 502INTERNAL_ERROR |
| Rate limited | 900000000007 | 429TOO_MANY_REQUESTS |
| Wallet balance too low | 900000000008 | 402PAYMENT_REQUIRED |
| Invalid format | 9000000 | 400BAD_REQUEST |
Frequently asked questions
What is penny drop verification?
Penny drop is a bank account check where a very small credit is sent to the account through a real-time rail and the bank's response shows whether the account accepted it and, often, the holder name. StampMitra's endpoint returns the account status, the name at the bank and a utr, but its reference does not state the upstream method or amount.
Which fields do I send to the bank account verification API?
accountNumber (a 9 to 18 digit numeric string) and ifsc (11 characters) are required. name, the beneficiary name you expect, is optional but should always be sent when you have it, and phone, the account holder's 10-digit Indian mobile number, is optional and documented as improving match confidence.
What does nameMatchResult GOOD_MATCH mean, and what score should I accept?
GOOD_MATCH with a nameMatchScore of 100 is the documented example of a clear match. The reference does not publish the other labels or a scale, so set your own thresholds from real production data during a pilot, write them down with a date, and send the unclear band to a human reviewer.
Am I charged when the account is invalid?
Yes. A negative determination is a completed verification, so it is recorded and billed and you receive a referenceId. A malformed account number or IFSC fails with a 400 before verification, as do bad keys and missing scopes, and those calls are not billed.
Why does a valid account still fail my payout check?
Because valid only says the account can be verified. The holder name can still differ from the person you meant to pay. Read accountStatus and nameMatchResult together, and treat valid true with a poor name match as a case for review, not approval.
How should I handle timeouts and retries?
Retry only on 429 and 502, with exponential backoff, jitter and a cap of two or three attempts. The referenceId is not an idempotency key and the route documents no idempotency header, so a timed-out call may have completed and been billed. Reuse a recent completed result where you can.
Should I verify at beneficiary creation or at every payout?
Most teams verify when the beneficiary is created, store the decision, and re-verify when the account details change, after a long dormancy or before an unusually large payout. That pays once per account instead of once per payment and still catches accounts that closed or were edited.
Can I combine bank verification with PAN and GSTIN checks?
Yes, and it is the strongest pattern. Verify the PAN or GSTIN first, take the registered or legal name from that response, and pass it as name to the bank account call. A PAN name and a bank name that disagree is the most useful signal for a reviewer.
Do the sandbox test values behave like real accounts?
No. Sandbox returns sample data, names are synthetic and the same input always gives the same answer, roughly two in three valid for ordinary inputs. Use it for plumbing and error handling, not for tuning name-match thresholds or estimating failure rates. Sandbox calls never debit your wallet.
What do I store after a bank account check?
Store your beneficiary ID, the referenceId, the utr, the decision, the reason code, the score, your thresholds and a timestamp. You rarely need nameAtBank or the full account number afterwards, and keeping them out of application logs reduces what you must protect and eventually delete.
Can I call the endpoint from a mobile app or browser?
No. Call it from your backend only. A key in client code can be copied by anyone, and it would sit outside any IP allowlist you set. Keep the key in a secrets manager, grant only the verification.bank-account.read scope and use a separate key per service.
What happens if the bank is unreachable?
The endpoint returns 502 INTERNAL_ERROR with a requestId when the upstream service cannot be reached. No verification completed, so no completed-call charge applies. Retry with backoff, and alert by IFSC bank code so operations can see when one bank's responses are failing in clusters.