StampMitraDevelopers
LiveVerification API

Bank Account Verification API for India: Penny Drop, Name Match and Payout Checks

Verify a Bank Account in real time.

POST/v1/verify/bank-accountScope verification.bank-account.read₹4 per call
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"
  }'
Example responseJSON
{
  "referenceId": "SMV-20260927-3B71A0",
  "valid": true,
  "nameAtBank": "RAVI KUMAR",
  "bankName": "ICICI Bank",
  "utr": "017952100012345",
  "city": "Mumbai",
  "branch": "Andheri West",
  "micr": "400229002",
  "nameMatchScore": "100",
  "nameMatchResult": "GOOD_MATCH",
  "accountStatus": "ACCOUNT_IS_VALID",
  "accountStatusCode": "1",
  "ifscDetails": {
    "bank": "ICICI Bank",
    "ifsc": "ICIC0001234",
    "micr": "400229002",
    "address": "Andheri West, Mumbai",
    "city": "Mumbai",
    "state": "Maharashtra",
    "branch": "Andheri West"
  }
}

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) and ifsc (11 characters). Optional: name and phone.
  • The response gives you accountStatus, nameAtBank, nameMatchResult, nameMatchScore, bank, branch, city, MICR and a nested ifscDetails object, plus a utr and the StampMitra referenceId.
  • Pass name whenever 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 400 before 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. Keep nameAtBank and 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.

  1. 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.
  2. Is the account in a state that can receive money? An account can exist and still be closed, frozen or dormant.
  3. 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.

PropertyValue
Method and pathPOST /v1/verify/bank-account
Base URLhttps://api-b2b.stampmitra.in
AuthenticationAuthorization: Bearer <api-key>, or the x-api-key header
Scopeverification.bank-account.read
Metered asbank-account.verify, recorded after a successful response
Production price₹4 per completed call, excluding GST

The request

cURL
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

Request parameters
FieldTypeDescription
AuthorizationrequiredheaderBearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted.
accountNumberrequiredstring9-18 digit numeric bank account number.
ifscrequiredstring11-character IFSC code, e.g. ICIC0001234.
namestringBeneficiary name to match.
phonestringAccount holder's 10-digit Indian mobile number, when available; improves match confidence.

Response fields

Response fields
FieldType
referenceIdstring
validboolean
nameAtBankstring
bankNamestring
utrstring
citystring
branchstring
micrstring
nameMatchScorestring
nameMatchResultstring
accountStatusstring
accountStatusCodestring
ifscDetailsobject

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.

BandTypical signalAction
Clear matchnameMatchResult is GOOD_MATCH and the score is highRelease the payout or mark the beneficiary verified
UnclearA lower score, or a result label you have not seen beforeHold and send to a human with both names on screen
Clear mismatchA very low score, or valid is falseReject 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.verify and 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 accountNumber or ifsc returns 400, a bad key returns 401, a missing scope returns 403, 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, missing verification.bank-account.read scope. 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 a 429 can also be a sandbox limit (10 a minute or 200 a day per organisation; code SANDBOX_RATE_LIMIT, SANDBOX_DAILY_LIMIT or SANDBOX_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. valid may be true while nameMatchResult is 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_REQUEST

    accountNumber must be a 9-18 digit numeric bank account number

  • 401Missing or invalid API keyUNAUTHORIZED

    Missing or invalid API key.

  • 402Insufficient wallet balancePAYMENT_REQUIRED

    Insufficient fulfilment wallet balance to cover this call.

  • 403Valid key, missing required scopeFORBIDDEN

    API key is valid but lacks the required scope for this endpoint.

  • 429Rate limitedTOO_MANY_REQUESTS

    Rate limit exceeded: 60 requests per 60 seconds for this endpoint.

  • 502Upstream verification service unreachableINTERNAL_ERROR

    Unable 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.

JavaScript
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.

JavaScript
// 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

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

JavaScript
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.

  1. The partner enters PAN, bank account number, IFSC and name.
  2. 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.
  3. It then calls bank account verification, passing the PAN-registered name rather than what the user typed, and the partner's mobile number.
  4. A clear match on both marks the partner verified and enables weekly payouts.
  5. 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.
  6. TrunkLine stores both referenceId values, 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. 000123456789 is a different account from 123456789. 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, LLP or 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 KUMAR and RAVI KUMAR SHARMA are 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 review often 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.
  • 402 count, which should be zero. A single one means a wallet ran dry in production and payouts are about to stall.
  • 429 count 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.

JavaScript
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, 429 and 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.

Production checklist

  1. The key has only verification.bank-account.read, is stored in a secrets manager, and is restricted by IP where your plan allows.
  2. Input is normalised and validated locally; the account number travels as a string.
  3. name is always sent when you have one; phone only when you legitimately hold it.
  4. The response is handled as an allow-list for accountStatus and nameMatchResult; unknown values go to review.
  5. Thresholds were set from real production data in a pilot and are written down with a date.
  6. Retries only on 429 and 502, with backoff, a cap and a timeout; no retry loop on 4xx.
  7. Payout code refuses unverified beneficiaries inside the payout service.
  8. Logs hold reference IDs and decisions, not names or full account numbers.
  9. Wallet-balance and 402 alerts exist, sized in days of spend.
  10. A human review queue exists for the unclear band, with a written policy and an owner.
  11. A privacy notice and retention schedule cover the data.
  12. 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: true as 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 400 or 403 will never succeed on retry, and retrying a 429 immediately 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.

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.

Sandbox test values
ScenarioInput to sendWhat you get back
Valid account
900000000001
200
200 with valid true, accountStatus ACCOUNT_IS_VALID, nameAtBank and the IFSC details.
Account not found / invalid
900000000002
200
200 with valid false and accountStatus ACCOUNT_IS_INVALID.
Name does not match
900000000003
200
200 with valid true but nameMatchResult NO_MATCH and a low nameMatchScore.
Verification source times out
900000000005
502INTERNAL_ERROR
Our documented upstream-failure error, answered at once (no waiting). Retry with the same Idempotency-Key. Add the header X-Sandbox-Delay-Ms (up to 3000) to hold the reply and test your client timeout.
Verification source unavailable
900000000006
502INTERNAL_ERROR
Our documented 5xx error for an unreachable source (the same body a live call gives when the source is down). Safe to retry after a short delay.
Rate limited
900000000007
429TOO_MANY_REQUESTS
Too many requests. Back off and retry with exponential delay and jitter.
Wallet balance too low
900000000008
402PAYMENT_REQUIRED
The wallet cannot cover the call (catalogue entry INSUFFICIENT_WALLET_BALANCE, envelope code PAYMENT_REQUIRED). Nothing is debited in the sandbox. Top up and retry with the same Idempotency-Key.
Invalid format
9000000
400BAD_REQUEST
Validation error that names the field. Nothing is looked up and nothing is charged.

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.

Build with AI

Integrate Bank Account with one prompt.

Pick your AI tool and copy a prompt written for this API. It already has the endpoints, fields and errors.

Claude prompt · Bank Account · 6,826 charactersOpen Claude ↗
I'm using Claude to build this.

Integrate the StampMitra API (Indian identity verification and e-Stamp Paper) into my app.

API facts (source of truth: https://developer.stampmitra.in/llms.txt)
- Base URL: https://api-b2b.stampmitra.in
- Auth: send "Authorization: Bearer <key>" (or "x-api-key: <key>") on every request
- Requests and responses are JSON. Send Content-Type: application/json on POST.
- Use a SANDBOX key (sk_test_...) while building. Read it from the environment variable STAMPMITRA_API_KEY.
- Never hard-code the key, never expose it to the browser, never log it.
- Call StampMitra only from server-side code. The UI calls my own backend route.

How to build it
- First inspect my project: language, framework, package manager, HTTP client, test runner and folder conventions. Follow them. If the project is empty, ask which stack I want before writing code.
- The official StampMitra SDKs (Node.js, Python, PHP, Java, Go, .NET, Ruby) are pre-release 0.1.0 and not yet published to npm, PyPI, Packagist, Maven Central, the Go module proxy, NuGet or RubyGems, so do not run an install command for them. Call the REST API over HTTPS with the HTTP client my project already uses. Do not install or invent a StampMitra package.
- Put every StampMitra call in ONE small client module. It adds the auth header, applies a 15 second timeout and turns error responses into a typed error with status, code, message and requestId.
- Add STAMPMITRA_API_KEY to .env.example with a placeholder (sk_test_xxx). Fail fast at startup with a clear message if it is missing. Never commit real keys.

Error handling (every error body is { error: { code, message, requestId } })
- 400 BAD_REQUEST: invalid input. Show a field-level message. Do not retry.
- 401 UNAUTHORIZED: key missing or invalid. This is my configuration problem, not the end user's. Show a generic "service unavailable" message, log the requestId, do not retry.
- 402 PAYMENT_REQUIRED: not enough wallet balance (production). Surface it to me as an operational alert, not to the end user.
- 403 FORBIDDEN: the key lacks the required scope or the service is not enabled. Say which scope the endpoint needs.
- 404 NOT_FOUND: wrong id or path. Do not retry.
- 429 TOO_MANY_REQUESTS (or, on a sandbox key, SANDBOX_RATE_LIMIT, SANDBOX_DAILY_LIMIT, SANDBOX_IP_LIMIT): rate limit, or the sandbox limits of 10 requests a minute and 200 a day per organisation. Retry at most 3 times with exponential backoff and jitter (honour Retry-After if present), then show a friendly "try again shortly" message.
- 5xx / 502 / network timeout: retry reads (GET) up to 2 times. For POST calls retry at most once, then show a friendly message.
- Log requestId and referenceId with every failure. Never log the API key, a full PAN, bank account number or whole response bodies.

TASK: Integrate the StampMitra "Bank Account" API
Verify a Bank Account in real time.
Production service code: bank-account.verify

ENDPOINT: POST /v1/verify/bank-account
- Verify Bank Account
- Required scope: verification.bank-account.read
- Parameters:
  - accountNumber (string, required): 9-18 digit numeric bank account number.
  - ifsc (string, required): 11-character IFSC code, e.g. ICIC0001234.
  - name (string, optional): Beneficiary name to match.
  - phone (string, optional): Account holder's 10-digit Indian mobile number, when available; improves match confidence.
- Example request body: {"accountNumber":"000123456789","ifsc":"ICIC0001234","name":"Ravi Kumar"}
- Response fields: referenceId, valid, nameAtBank, bankName, utr, city, branch, micr, nameMatchScore, nameMatchResult, accountStatus, accountStatusCode, ifscDetails
- Example response: {"referenceId":"SMV-20260927-3B71A0","valid":true,"nameAtBank":"RAVI KUMAR","bankName":"ICICI Bank","utr":"017952100012345","city":"Mumbai","branch":"Andheri West","micr":"400229002","nameMatchScore":"100","nameMatchResult":"GOOD_MATCH","accountStatus":"ACCOUNT_IS_VALID","accountStatusCode":"1","ifscDetails":{"bank":"ICICI Bank","ifsc":"ICIC0001234","micr":"400229002","address":"Andheri West, Mumbai","city":"Mumbai","state":"Maharashtra","branch":"Andheri West"}}
- Errors this endpoint can return:
  - 401 UNAUTHORIZED: Missing or invalid API key
  - 403 FORBIDDEN: Valid key, missing required scope
  - 400 BAD_REQUEST: Validation error
  - 402 PAYMENT_REQUIRED: Insufficient wallet balance
  - 429 TOO_MANY_REQUESTS: Rate limited
  - 502 INTERNAL_ERROR: Upstream verification service unreachable
- Notes: Input format is validated up front - a malformed pan/gstin/etc. fails fast with a 400 rather than being submitted for verification. referenceId (format SMV-YYYYMMDD-XXXXXXX) is StampMitra's own transaction id for this call and is always present, including on a negative (valid: false / found: false) result - both positive and negative determinations are completed, billable verifications. This is not an idempotency key.

Rules for this verification
- Validate accountNumber, ifsc on client and server before calling. A malformed value returns 400.
- "valid": false (or found: false) is a completed, billable verification. Show a clear "not valid" result, not a crash.
- Mask sensitive identifiers in the UI after submit and never log them in full.
- Store referenceId, the outcome and a timestamp with the record for audit. Do not re-call on every page load: cache per record.
- Build: one backend route that calls StampMitra, one small form, and a result card with loading, success, not-valid and error states.

Test in Sandbox
- A successful call, a validation failure (expect 400), a missing or wrong key (expect 401) and the 429 / 5xx retry path.

How I want you to work:
1. Before writing code, list the files you will create or change and the plan in 5-8 bullets. Then implement without pausing for approval.
2. If the StampMitra MCP server (@stampmitra/mcp-server) is connected, use it to run real sandbox calls and check the response shape before coding against it.
3. Write tests for the API client module and the validation (mock the HTTP layer).
4. At the end, summarise what you changed, how to run it and what I must do manually (add the key, restart the server).

Acceptance checklist:
- Works end to end in Sandbox with the real response fields (no mocked data in the final path)
- No secrets in client code, logs, URLs or git
- Clear loading, empty and error states, including 400, 401, 402, 403, 429 and 5xx
- referenceId (and requestId on failures) is stored or logged for audit
- Inputs are validated on client and server, and sensitive values are masked in the UI
- Tests cover the API client, validation and at least one error path
- A short note on how to run it and how to switch from Sandbox to production later
- If anything is missing (like my key), ask me. Do not guess endpoints, fields or values.

Start with a sandbox key.

Free to try. Make your first test call today.