StampMitraDevelopers
Livee-Stamp Paper APIStep 1 of 8

e-Stamp catalogue API: find out which e-stamp services your account can order

Discover which e-Stamp instruments/services are available to your organization.

GET/v1/servicesScope services.readAPI fee ₹5 per call
curl -X GET "https://api-b2b.stampmitra.in/v1/services" \
  -H "Authorization: Bearer $STAMPMITRA_API_KEY"
Example responseJSON
[
  {
    "serviceCode": "estamp.instrument.rent_agreement",
    "name": "Rent Agreement e-Stamp",
    "category": "estamp",
    "basePrice": "500.00",
    "currency": "INR",
    "isActive": true,
    "gstRatePercent": "18.00",
    "defaultGovernmentFee": null,
    "processingTimeHours": 24,
    "guestCheckoutEnabled": false,
    "requiresDocuments": true,
    "uiSchema": null,
    "entitled": true,
    "entitlementUpdatedAt": "2026-09-01T10:00:00.000Z"
  }
]

Before your product can offer an e-stamp to anyone, it has to know whether it is allowed to. The e-Stamp catalogue call answers that. GET /v1/services returns the services your organisation is entitled to, e-Stamp ones included, and GET /v1/services/:serviceCode returns one of them. It is a small, cheap, read-only call, and it is the first step of the eight-step e-Stamp flow. Teams tend to skim it and then discover, a month into the build, that half of their questions about availability, caching and entitlement were answered by fields they ignored.

This page is the long version of that first step. It covers what the call returns field by field, how to read entitlement correctly, how the service catalogue differs from the state and article catalogues, how to cache it without ever showing a stale or wrong offer, how to wire it into a UI, what fails and why, and how to test it. It is written for backend developers, but the sections on entitlement and on what the price fields do and do not mean are meant for product managers too.

What the catalogue call is for

Think of the catalogue as your account's menu. It lists the things StampMitra will let you order with your API key right now. For the e-Stamp surface that means entries whose serviceCode starts with estamp., for example estamp.instrument.rent_agreement. The same call also lists verification services your account may use, which is why it sits in the generic services.read scope instead of an e-Stamp scope.

Three questions are answered here and nowhere else. Is e-Stamp switched on for this organisation at all? Which e-Stamp service codes may it use? And what does the platform say about each one: its display name, whether it is active, how long it usually takes, whether documents must accompany an order, and what GST rate applies to the platform's own charges. What the catalogue does not answer is anything about states, articles, duty or prices of a particular stamp. Those come from later steps, and mixing them up is the most common early design mistake, which a later section untangles.

The two routes and their scope

RouteReturnsScopeMetered by StampMitra
GET /v1/servicesEvery service the organisation is entitled to, verification and e-Stamp togetherservices.readNo
GET /v1/services/:serviceCodeOne service, if it is entitled and activeservices.readNo

The base URL is https://api-b2b.stampmitra.in. Authenticate with Authorization: Bearer <key> or x-api-key: <key>. A sandbox key starts with sk_test_ and a production key with sk_live_. Neither call debits your wallet. A key without services.read gets 403 with the code FORBIDDEN; a missing or invalid key gets 401 with UNAUTHORIZED.

The per-service route is the right choice when you already know the code you need, for example on the page where a user starts a rental stamp. The list route is the right choice at startup, in a nightly refresh and in your admin tooling. Do not call the list route on every page view to find one entry.

cURL
export STAMPMITRA_API_KEY="sk_test_xxxxxxxxxxxx"
export BASE="https://api-b2b.stampmitra.in"

curl -s "$BASE/v1/services" -H "Authorization: Bearer $STAMPMITRA_API_KEY"

curl -s "$BASE/v1/services/estamp.instrument.rent_agreement" \
  -H "Authorization: Bearer $STAMPMITRA_API_KEY"

GET/v1/services

List entitled services (generic catalog, covers e-Stamp services too)

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.

Response fields

Response fields
FieldType

GET/v1/services/:serviceCode

Get one entitled service's detail

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.
serviceCoderequiredpathThe service's unique code.

Response fields

Response fields
FieldType
serviceCodestring
namestring
categorystring
basePricestring
currencystring
isActiveboolean
gstRatePercentstring
defaultGovernmentFeenull
processingTimeHoursnumber
guestCheckoutEnabledboolean
requiresDocumentsboolean
uiSchemanull
entitledboolean
entitlementUpdatedAtstring

Reading the response, field by field

The list route returns an array. Each element describes one service. The single-service route returns one such object. The shape below is the documented example for a rent agreement service.

JSON
{
  "serviceCode": "estamp.instrument.rent_agreement",
  "name": "Rent Agreement e-Stamp",
  "category": "estamp",
  "basePrice": "500.00",
  "currency": "INR",
  "isActive": true,
  "gstRatePercent": "18.00",
  "defaultGovernmentFee": null,
  "processingTimeHours": 24,
  "guestCheckoutEnabled": false,
  "requiresDocuments": true,
  "uiSchema": null,
  "entitled": true,
  "entitlementUpdatedAt": "2026-09-01T10:00:00.000Z"
}
FieldTypeWhat it means for you
serviceCodestringThe stable identifier. Use it as a key in your own tables and when you call other routes. Never parse meaning out of its dotted segments.
namestringA display name. Fine for an admin screen, but write your own customer-facing copy rather than showing it verbatim.
categorystringestamp for the services this page cares about. Filter on this, not on a prefix of serviceCode, when you can.
basePricedecimal stringA generic service price field. For e-Stamp it is not the price of an actual stamp, which depends on state, article and duty. See the section on prices below.
currencystringINR.
isActivebooleanWhether the service is currently offered. An inactive service should not be shown.
gstRatePercentdecimal stringThe GST rate applied to StampMitra's own charges. Statutory duty is never taxed.
defaultGovernmentFeedecimal string or nullA default government amount where the service defines one. Null for e-Stamp services, because duty is chosen per stamp.
processingTimeHoursintegerAn expectation to show users, not a promise to enforce in code.
guestCheckoutEnabledbooleanWhether the service can be ordered without a known end customer. False in the example.
requiresDocumentsbooleanWhether supporting documents are expected with an order.
uiSchemaobject or nullForm metadata attached to the service. Null for e-Stamp here, because the e-Stamp form comes from its own schema route.
entitledbooleanWhether your organisation may order this service.
entitlementUpdatedAtISO 8601 timestampWhen your entitlement for this service last changed.

A practical rule of thumb: your UI should show a service only when entitled and isActive are both true. Everything else is decoration around that decision.

What entitlement means, and how it changes

Entitlement is the platform's way of saying yes or no to your organisation for a product. For e-Stamp it has a second layer that is easy to miss. Every /v1/estamp/* route is guarded by an estamp.enabled flag on the organisation. If the flag is off, those routes return HTTP 400 with a message saying the organisation is not entitled, regardless of what your key's scopes say. The catalogue is how you find that out cheaply before a user hits a dead end.

Production access works the same way. All eight e-Stamp reference pages gate on one estamp service code, so approval for e-Stamp is a single decision rather than eight, and it is separate from approval for verification APIs. A sandbox account can read a catalogue, and what it shows is what the sandbox allows. When production access is approved, entitlementUpdatedAt is the field that moves.

Two behaviours follow from this. First, an empty e-Stamp list is a configuration state and not an error. It means the organisation is not entitled yet, and retrying will not change it. Show a "not available on your account" message, log it once, and point the person to the production access status in the dashboard or to developer support. Second, entitlement can change under you. A service can disappear from the list, or become inactive, between two calls. Your code must treat a change as normal and recover gracefully, not as an exception.

Three catalogues, and which question each answers

The word "catalogue" appears three times in the e-Stamp flow, and it means three different things. Confusing them leads to designs where a user is offered an option that later fails.

CatalogueRouteQuestion it answersScope
Service catalogueGET /v1/servicesMay my account order e-Stamp at all, and under which service codes?services.read
State catalogueGET /v1/estamp/statesIn which states can I stamp, and what does each state need?estamp.read
Article catalogueGET /v1/estamp/states/:stateCode/instrumentsFor this state, which kinds of document can I stamp, and with what limits?estamp.read

They are consulted in that order, narrowing the choice each time. A product that asks for an article before it has checked entitlement will occasionally show an article in a state its account cannot use. A product that checks entitlement once at startup and never again will keep offering a service after production access is paused. The state and article lookup page covers the second and third catalogues in full.

A note on prices in the catalogue

The catalogue carries basePrice, gstRatePercent and defaultGovernmentFee, and it is natural to wonder whether these tell you what a stamp costs. For e-Stamp they do not, and building a price display on them will mislead users.

A real e-stamp has three money parts that behave differently. The statutory duty is the amount chosen for the document, it is never taxed and never marked up, and it comes from the state's rules. The procurement and convenience fees depend on the state and quantity and carry GST. StampMitra's own API fee is charged per metered call to your account and is covered by your plan. None of those is a single catalogue number. The price of an actual order comes from the duty calculation call, which separates duty from fees and GST, and the plan rates are on the pricing page. The API fee for the e-Stamp surface is ₹5 per charged call on pay-as-you-go before GST, and lookups such as this catalogue are not among the charged calls.

Sandbox

Free

Build and test with a sandbox key.

Production API fee

₹5 / call

Pay-as-you-go per successful call, lower on Growth and Scale. Excludes 18% GST. State procurement fee and stamp duty are quoted per order. Full pricing

Access scope

services.read

Your API key needs this scope to call the endpoint.

Treat basePrice as metadata that exists because the same service object serves every product on the platform. If your admin screen shows it, label it as a platform reference value rather than the price a customer pays.

Caching the catalogue without showing stale offers

The catalogue changes rarely and is cheap, which makes it a good candidate for a short cache. The risk is a cache that outlives a change in entitlement and keeps offering a service the account can no longer order. A design that handles both has three parts.

Cache with a short time to live. A few minutes for the list is plenty for most products, and you can go longer in a back-office tool. The per-service route can use the same cache keyed by serviceCode.

Refresh on failure signals. If any e-Stamp route returns 400 with a not-entitled message, or 403, discard the cached entry for that service immediately and refetch. That turns an entitlement change into a one-request blip instead of an outage.

Serve stale on upstream errors, but not forever. If the catalogue call returns a 5xx or times out, keep serving the last good answer for a bounded period, then fail closed. Offering a service you cannot confirm is worse than saying it is temporarily unavailable.

JavaScript
// Node 18+, global fetch
const BASE = "https://api-b2b.stampmitra.in";
const headers = { Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}` };

let cache = { at: 0, items: null };
const FRESH_MS = 5 * 60_000;      // normal reuse window
const STALE_MS = 60 * 60_000;     // longest we will serve a stale list when the API is down

export async function estampServices({ force = false } = {}) {
  const age = Date.now() - cache.at;
  if (!force && cache.items && age < FRESH_MS) return cache.items;
  try {
    const res = await fetch(`${BASE}/v1/services`, { headers });
    const body = await res.json();
    if (!res.ok) throw Object.assign(new Error(body.error?.message), { status: res.status, requestId: body.error?.requestId });
    cache = { at: Date.now(), items: body.filter((s) => s.category === "estamp" && s.entitled && s.isActive) };
    return cache.items;
  } catch (err) {
    if (cache.items && age < STALE_MS && (!err.status || err.status >= 500)) return cache.items;
    throw err;
  }
}
Python
import os, time, requests

BASE = "https://api-b2b.stampmitra.in"
H = {"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}"}
_cache = {"at": 0.0, "items": None}

def estamp_services(force: bool = False, fresh: int = 300, stale: int = 3600):
    age = time.time() - _cache["at"]
    if not force and _cache["items"] is not None and age < fresh:
        return _cache["items"]
    try:
        r = requests.get(f"{BASE}/v1/services", headers=H, timeout=15)
        if not r.ok:
            err = r.json().get("error", {})
            raise RuntimeError(f"{r.status_code} {err.get('code')} req={err.get('requestId')}")
        items = [s for s in r.json() if s.get("category") == "estamp" and s.get("entitled") and s.get("isActive")]
        _cache.update(at=time.time(), items=items)
        return items
    except (requests.ConnectionError, requests.Timeout):
        if _cache["items"] is not None and age < stale:
            return _cache["items"]
        raise

The shape of the filter is the important part: category, entitled, isActive. If a future version adds fields, your code keeps working because it ignores what it does not know.

Using the catalogue in a product

How you use the response depends on who sees it.

An end-user journey. Fetch the list when the user opens the stamping flow, or read it from your cache. If it contains one e-Stamp service, skip the picker and go straight to the form. If it contains several, show a picker built from your own copy keyed by serviceCode. If it contains none, show a clear message and an alternative, such as a link to talk to your team.

An admin or operations console. Show the raw entries, including entitled, isActive and entitlementUpdatedAt, so that a person can see why a service is or is not available. This is the screen that saves you a support ticket the first time someone asks why the option vanished.

A background worker. Workers should not call the catalogue per job. Resolve the service code once when the job is created and store it on the job. If a retry happens later, the service code is already decided and the worker does not depend on a catalogue read.

A multi-tenant platform. If your platform serves several of your own customers under one StampMitra organisation, remember that entitlement belongs to the organisation, not to your customer. Decide separately which of your customers may use which service, and enforce that in your own code. The catalogue tells you what your organisation can do, not who among your users may do it.

Whatever the use, keep the service code on every order record you create. It is the thread that links your order to the platform's records and it is what support will ask for.

What `processingTimeHours` does and does not tell you

processingTimeHours is an expectation, and you should present it as one. It is a catalogue-level number for the service, and a real order moves through review and vendor steps that the catalogue cannot predict. An order in review, for example, will not turn into a certificate in 24 hours just because the catalogue says 24. The order lifecycle has pre-placement statuses, and the document access page covers the certificate route that tells you when a certificate is actually ready.

A good pattern is to show "usually within about a day" in your UI, to track the actual elapsed time per order in your own database, and to alert when orders exceed some multiple of the expectation. That way the number is informative without becoming a promise your system cannot keep.

Errors and how to react

Every error from every route uses the same envelope: { "error": { "code", "message", "requestId" } }. Log the requestId with each failure.

StatusCodeWhenWhat to do
401UNAUTHORIZEDMissing or invalid keyFix the key. Do not retry
403FORBIDDENValid key without services.readAdd the scope or use the right key
404NOT_FOUNDThe service code does not exist, or is not entitled or active for youRefresh the list, drop the code from your UI
429TOO_MANY_REQUESTSRate limit exceededBack off exponentially, then reuse the cache
502INTERNAL_ERRORThe upstream service is unreachableRetry with backoff, serve stale for a bounded time

A 404 on the per-service route deserves a closer look. The documentation describes that route as returning detail for a single service "if entitled and active", so a 404 can mean either that the code is wrong or that the service is not available to you. Your handling should be the same for both: stop offering that service, and look at the full list if you need to know why.

Retries here are safe because both routes are reads. Use exponential backoff with jitter and a cap, and never retry on 401 or 403.

Sandbox and production

Sandbox keys never debit your wallet and are subject to the sandbox limits (10 requests a minute and 200 a day per organisation, and 50 a day per IP address, resetting at midnight IST). Every e-Stamp sandbox request counts toward them, catalogue reads included, so a loop that polls states and articles spends the same allowance as an order. A sandbox organisation's catalogue is a view of what the sandbox allows. Production keys read the production entitlement, which exists only after your production access request is approved.

This has a testing implication. Do not assume that a service listed in sandbox will be listed in production the moment you switch keys. Check the production response during your go-live rehearsal and compare it with what your code expects. The sandbox versus production guide walks through the steps, and the authentication reference explains how keys and scopes work.

Security and key hygiene

The catalogue is not sensitive on its own, but the key that reads it can do much more. Keep the following habits.

  • Call StampMitra from your server, never from a browser or a mobile app. A key embedded in client code is a leaked key.
  • Give the catalogue reader its own key with only services.read, and give order-creating services separate keys with their own scopes.
  • Use the IP allowlist where your plan supports it, and route outbound calls through a stable egress address.
  • Do not log full response bodies in places that many people can read. The catalogue is not secret, but habits matter.
  • Rotate keys on a schedule and when someone with access leaves.

Testing the catalogue integration

A few tests give you most of the value.

  1. Fixture test. Save one real sandbox response as a file in your repository and run your parsing against it in CI. If the shape changes, the test fails with a clear diff.
  2. Filter test. Feed the parser a list with one entitled service, one not entitled, one inactive and one of another category. Assert that only the first survives.
  3. Cache test. Simulate an upstream failure and assert that stale data is served within the window and refused after it.
  4. Entitlement-change test. Simulate a 400 not-entitled response on a later route and assert that your cache entry is dropped.
  5. Empty-list test. Assert that an empty list produces a clean "not available" state and no retry storm.

In a go-live rehearsal, add one live check: call the list with your production key before you open the flow to users, and fail the deploy if no active e-Stamp service is returned.

Worked example: a rental platform checks its menu

A rental platform runs a nightly job that refreshes its service cache and an on-demand check when a landlord opens "Stamp this agreement".

At startup the job calls GET /v1/services, filters to category == "estamp", entitled and isActive, and stores the result with a timestamp. It finds estamp.instrument.rent_agreement. It writes the code and entitlementUpdatedAt to a settings table, and it also writes a metric, "estamp services available: 1".

When a landlord opens the flow, the application reads the cached entry. It shows "Stamp this agreement, usually within about a day", based on processingTimeHours, and starts the form.

Three weeks later, the account's production access is paused for a billing review. The next catalogue read returns no e-Stamp entry. The cache entry expires within five minutes. Landlords see "Stamping is temporarily unavailable. Your agreement is saved." The metric drops to zero and an alert fires, because the platform treats "zero available services" as an incident, not as a normal state. When access is restored, entitlementUpdatedAt changes, the next refresh finds the service, and the flow reopens without a deploy.

Nothing in that story required the platform to understand why entitlement changed. It only required reading the answer honestly and acting on it.

Modelling services in your own database

Resist the urge to store the catalogue entry as a blob next to each order. Store a thin reference and keep the rest in a table you refresh. A workable layout has two tables.

TableColumns worth havingWhy
estamp_serviceservice_code (primary key), display_name, category, is_active, entitled, processing_time_hours, gst_rate_percent, entitlement_updated_at, fetched_atThe last known catalogue, refreshed by one job. The UI reads this, never the API directly.
estamp_orderid, service_code (foreign key), catalogue_fetched_at, plus your own order columnsRecords which service an order was created under and how fresh your view of it was.

The catalogue_fetched_at column looks fussy and pays for itself the first time a dispute starts with "the platform offered this service yesterday". It lets you show exactly what your system believed at the moment of the order. If you keep a history table rather than overwriting, you also get a free audit trail of when entitlements changed, which is useful the day someone asks why stamping stopped for a few hours.

Keep serviceCode as a string key and resist enums. A new e-Stamp service appearing in the catalogue should show up in your admin screen without a deploy, even if you decide not to offer it to customers until someone has written copy for it. A good pattern is a visible_to_customers flag in your own table: the catalogue says whether you may order a service, and your flag says whether you want to sell it.

Designing the picker and the states around it

A service picker looks trivial and has more states than most teams plan for. Design all of them before the first screen is built.

StateWhat the catalogue returnedWhat the user should see
ReadyOne or more entries that are entitled and activeThe picker, or the form directly when there is one entry
Not enabledNo e-Stamp entry at allA plain message that stamping is not available on this account, and who to contact
PausedAn entry with isActive false, or entitled false after having been true"Temporarily unavailable", with the saved draft kept safe
LoadingA request in flightA skeleton, not a spinner that blocks the whole page
FailedA 5xx or timeout with no usable cache"We could not check availability", with a retry action

Two copy details matter. Do not tell a user that stamping is "not supported in your state" because the catalogue is empty. The catalogue says nothing about states; that decision belongs to the state catalogue. And never show raw error text such as "organisation not entitled" to an end customer, since it reveals account configuration. Show your own wording and log the original message with its requestId.

For internal users, add a debug panel behind a permission that shows the raw catalogue entry, the time it was fetched and whether it came from cache. It costs an afternoon and removes a class of "is it us or them" conversations.

Watching the catalogue in production

The catalogue is a good canary because it is small, stable and tied to commercial state. A few signals are worth turning into dashboards.

  • Available e-Stamp services. A gauge refreshed by the job. Alert when it drops to zero, since that is almost always a commercial or configuration event and never a normal state.
  • Entitlement drift. Compare the new list with the previous one and emit an event when a service appears, disappears, or flips isActive. A Slack message with the service code and entitlementUpdatedAt is enough.
  • Catalogue call failures. Count by status. A rise in 403 means a key lost a scope. A rise in 429 means something is calling the list too often. A rise in 502 means the upstream is unhealthy, and it is your cue to rely on the stale window.
  • Cache age at serve time. If the age at which you serve the list creeps up, the refresh job is failing quietly.

None of this needs a monitoring product. A scheduled job that writes a few log lines and a metric is enough, as long as someone owns the alert.

What to do when entitlement drifts

Entitlement drift is a normal operational event, and a short runbook turns it from a scramble into a routine.

  1. Confirm it is real. Call the list with the production key from a shell. If the service is missing there too, it is not a cache problem.
  2. Check recent changes on your side. Was a key rotated or a scope removed? A 403 on the catalogue with a previously working key points here.
  3. Check production access status in the dashboard. A paused or under-review state explains a missing service.
  4. Protect users. Switch the affected journey to its "temporarily unavailable" state and make sure drafts are saved, so nobody loses work.
  5. Contact developer support with the service code, the entitlementUpdatedAt you last saw and a recent requestId.
  6. After recovery, clear the cache, confirm that a test order can be validated, and record the incident in your own log.

Write it down once, put it next to the alert, and the first drift will cost minutes instead of an afternoon.

Keys and scopes across the whole flow

The catalogue is the only e-Stamp step that uses services.read. Keeping the scopes of the other steps in view helps you decide how many keys to create.

ComponentScopesCalls
Catalogue refresherservices.readGET /v1/services
Form and lookup serviceestamp.readschema, states, articles, districts, SROs
Quote serviceestamp.duty.calculateduty calculation
Order workerestamp.orders.validate, estamp.orders.create, estamp.parties.writevalidate, create, parties
Status pollerestamp.orders.read, estamp.stamps.readorders, stamps, certificate

Five small keys are easier to reason about than one large one, and a leaked refresher key can do almost nothing. If your organisation is small, two keys is a reasonable compromise: one for read-only lookups and one for everything that writes or spends. The authentication reference lists how keys are created and rotated.

What the catalogue does not do yet

It helps to be plain about limits so you do not design around features that are not there. There is no e-Stamp-specific catalogue endpoint: e-Stamp services appear as ordinary service entries once entitled, which is why you filter on category here. The list route has no documented filters or pagination, so you receive everything and filter client-side. The catalogue does not tell you which states a given service supports, and it does not carry pricing for an actual stamp. Those gaps are covered by the state and article routes and by the duty calculation, which is exactly why the flow has eight steps rather than one.

Common mistakes

  • Treating basePrice as the price of a stamp. It is a generic field. Real price comes from the duty calculation.
  • Hardcoding estamp.instrument.rent_agreement. The code is yours to read from the catalogue, not to assume.
  • Calling the list on every request. It is cheap, but it is rate limited and unnecessary.
  • Treating an empty list as an outage. It is a configuration state.
  • Parsing meaning out of the service code. Use the fields, not the string.
  • Never refreshing. An entitlement change then lasts until the next deploy.
  • Showing name as customer copy. Write your own words.
  • Skipping the catalogue and going straight to an order. You lose the cheapest early warning you have.

Where this fits in the flow

The catalogue is step one of eight. After it come the schema and options, the state, instrument and article lookup, the duty and value calculation, the parties, the order, the payment and the order status and document access. The overview guide shows them together with a complete rental example, and the e-Stamp order flow guide goes deeper on retries and webhooks. The e-Stamp API reference lists the parameters in tabular form.

StampMitra is a private LegalTech platform operated by Bani Global Industries LLP. It is not a government body or a law firm, and nothing here is legal advice. Which article applies to your document, and what duty it attracts, are questions for you or your counsel; the service terms set out the division of responsibility.

Sources

Frequently asked questions

What does the e-Stamp catalogue API return?

GET /v1/services returns an array of the services your organisation is entitled to, verification and e-Stamp together. Each entry has a serviceCode, name, category, isActive, entitled, processingTimeHours and GST rate, so you can decide what to offer.

How do I know I can order an e-stamp with my account?

Find an entry whose category is estamp with entitled and isActive both true. If none exists, the organisation is not entitled yet, and every /v1/estamp route will answer 400 until production access for e-Stamp is approved.

Does basePrice tell me what a stamp costs?

No. basePrice is a generic field shared by every service on the platform. The cost of a real stamp depends on state, article and duty, and comes from the duty calculation call, which separates duty from fees and GST.

Is the catalogue call charged?

No. The service list and single-service routes are not metered, and sandbox calls never debit a wallet. StampMitra's API fee applies to charged e-Stamp calls such as duty calculation and parties, not to this lookup.

Why is my e-Stamp service list empty?

An empty list means your organisation is not entitled to e-Stamp yet. It is a configuration state, so do not retry. Check your production access status in the dashboard or write to developer support to have e-Stamp enabled.

How often should I refresh the catalogue?

A short cache of a few minutes is enough for most products. Drop the cached entry at once when a later e-Stamp route returns a not-entitled 400 or a 403, and serve stale data only for a bounded time when the API is down.

What scope does the catalogue need?

The services.read scope. A valid key without it gets 403 FORBIDDEN, and a missing or invalid key gets 401 UNAUTHORIZED. Give the catalogue reader its own key with only this scope, separate from your order-creating keys.

What is the difference between the service, state and article catalogues?

The service catalogue says whether your account may order e-Stamp at all. The state catalogue says where you can stamp and what each state needs. The article catalogue says which document types a state supports. Consult them in that order.

What does a 404 on GET /v1/services/:serviceCode mean?

Either the code does not exist or the service is not entitled and active for your account. Handle both the same way: stop offering the service, and read the full list if you need to understand which case applies.

Should I call the catalogue from a browser or mobile app?

No. Keep the API key on your server and call StampMitra from your backend. A key shipped in client code is exposed, and the catalogue key should carry only services.read in any case.

Does entitlement differ between sandbox and production?

Yes. A sandbox key reads what the sandbox allows, and a production key reads the production entitlement, which exists only after production access is approved. Check the production response in your go-live rehearsal rather than assuming it matches sandbox.

Build with AI

Integrate e-Stamp Catalog Discovery 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 · e-Stamp Catalog Discovery · 6,241 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 "e-Stamp Catalog Discovery" API
Discover which e-Stamp instruments/services are available to your organization.
Production service code: estamp

ENDPOINT: GET /v1/services
- List entitled services (generic catalog, covers e-Stamp services too)
- Required scope: services.read
- Response fields: 0
- Example response: [{"serviceCode":"estamp.instrument.rent_agreement","name":"Rent Agreement e-Stamp","category":"estamp","basePrice":"500.00","currency":"INR","isActive":true,"gstRatePercent":"18.00","defaultGovernmentFee":null,"processingTimeHours":24,"guestCheckoutEnabled":false,"requiresDocuments":true,"uiSchema":null,"entitled":true,"entitlementUpdatedAt":"2026-09-01T10:00:00.000Z"}]

ENDPOINT: GET /v1/services/:serviceCode
- Get one entitled service's detail
- Required scope: services.read
- Parameters:
  - serviceCode (path, required): The service's unique code.
- Response fields: serviceCode, name, category, basePrice, currency, isActive, gstRatePercent, defaultGovernmentFee, processingTimeHours, guestCheckoutEnabled, requiresDocuments, uiSchema, entitled, entitlementUpdatedAt
- Example response: {"serviceCode":"estamp.instrument.rent_agreement","name":"Rent Agreement e-Stamp","category":"estamp","basePrice":"500.00","currency":"INR","isActive":true,"gstRatePercent":"18.00","defaultGovernmentFee":null,"processingTimeHours":24,"guestCheckoutEnabled":false,"requiresDocuments":true,"uiSchema":null,"entitled":true,"entitlementUpdatedAt":"2026-09-01T10:00:00.000Z"}

Rules for this e-Stamp step
- This is one step of the e-Stamp order flow: services -> state/instrument/article -> schema -> duty -> order -> parties -> payment -> status -> documents.
- Build the form from the schema endpoint and do not invent e-Stamp fields.
- Send an Idempotency-Key header on order creation, store the order id, and make the flow resumable.
- Poll order status with backoff until a final status. Download documents through my backend, never from the browser with the key.
- If an endpoint returns 404 or is not enabled for my key, stop and ask me rather than guessing.

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.