AmpleTrails, Gurugram · since 2012 +91 93154 41053 WhatsApp info@ampletrails.com Developer guide · Guides
Products
Identity verificationBusiness verification (KYB)Bank, income & creditFace match & OCRVideo KYC, eSign & flowsCompliance & riskPayouts & messagingAll 52 APIs
Use cases
Customer onboarding (KYC)Merchant & seller onboarding (KYB)Vendor & supplier verificationEmployee background checksGig and field worker onboardingLoan underwritingPayout and refund validationDuplicate and synthetic identity detection
Industries
Fintech & Digital LendingBanks & NBFCsInsuranceBroking, Mutual Funds & WealthCrypto & VDA PlatformsReal-money GamingE-commerce & MarketplacesStaffing, Gig & HRTelecomMobility & LogisticsReal Estate & RentalsB2B & Procurement
Resources
GuidesGlossaryFAQSecurity & data
DevelopersPricingAbout
Theme
Get API keysCall +91 93154 41053

Developer guide

How our APIs behave, so you can plan an integration before you have keys. The full endpoint reference and a Postman collection come with your sandbox account.

Quickstart

Your server document number + consent AmpleTrails API one key · one response format Income TaxGSTNNPCI · banksDigiLocker JSON result with a request_id for your audit trail
Every check follows the same path: one request from your server, a query to the official source, one JSON result back.
  1. Ask for sandbox access on the contact page. You get a test key, the reference for the APIs you picked and a Postman collection.
  2. Make a first call from the terminal (below) or Postman.
  3. Build your flow against sandbox responses, including the failure cases. They matter more than the happy path.
  4. Finish a short business KYC with us, swap in the production key, and you are live. Nothing else changes.
curl -X POST https://api.ampletrails.com/v1/pan/verify \
  -H "Authorization: Bearer $AMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id_number": "ABCDE1234F", "name": "Ravi Kumar", "dob": "1990-04-12", "consent": "Y"}'
Response · 200 OK
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "data": {
    "pan_status": "VALID",
    "name_match": true,
    "name_match_score": 96,
    "dob_match": true,
    "category": "Individual",
    "aadhaar_linked": true,
    "pan_operative": true
  }
}

Authentication

Send your secret key as a bearer token: Authorization: Bearer <key>. Sandbox and production keys are separate. Keep keys on your server; never put them in a mobile app or in browser JavaScript.

For flows the user completes on their own device (DigiLocker, Video KYC, eSign, WhatsApp KYC) your server creates a short-lived session and hands its token or link to the client. Production accounts can also restrict calls to a list of server IPs.

Response format

Every API answers in the same envelope, so one parser handles all of them:

Every response
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "message": null,
  "data": {
    "...": "API-specific fields"
  }
}

Quote the request_id whenever you write to support. It lets us find the call in seconds.

Errors

HTTPCodeWhat it means
200successThe check ran. Read data for the result. A record the source could not find is still a 200, with a clear flag in data.
400bad_requestA required field is missing or badly formatted, for example a PAN that fails the 10-character format.
401unauthorizedThe key is missing, wrong, or from the other environment (sandbox vs production).
402insufficient_balanceYour prepaid wallet is too low for this call. Top up and retry.
403forbiddenThis API is not enabled on your account, or the call came from an IP that is not on your allow-list.
422verification_failedThe source rejected the input: a wrong OTP, an expired session, a consent that was declined.
429rate_limitedToo many requests too quickly. Back off and retry.
503source_unavailableThe government or bureau source is down or timing out. Retry later; these are usually short.

Identity, financial and bureau checks need the person's informed consent, collected before the call and kept with a timestamp. Requests carry "consent": "Y" and, where the source asks for it, a short purpose string. OTP-based APIs (Aadhaar eKYC, GST with OTP, DigiLocker, eSign) collect consent from the user inside the flow. See our DPDP checklist.

Webhooks and long-running checks

Video KYC, eSign, bank statement analysis, filed-document pulls and bulk jobs return a session_id straight away and post the final result to your webhook. Webhooks carry an HMAC-SHA256 signature header so you can confirm they came from us. Reply with HTTP 200; failed deliveries are retried with backoff, and you can always fetch the result by ID.

Timeouts and retries

Government sources slow down at month-end and around filing deadlines. Set a client timeout of at least 30 seconds, retry 503 and 429 with exponential backoff, and do not retry other 4xx errors, which will fail the same way again. Default rate limits are set per account and raised on request before a big launch.

Sandbox

The sandbox returns fixed, realistic responses for documented test inputs, including success, not-found, mismatch and source-down cases, so you can build every branch before going live. Sandbox calls never reach a government system and are not billed.

Going live

  • Business KYC with us: company documents and an authorised signatory.
  • Agree pricing and billing: prepaid wallet or monthly invoice.
  • Production keys, plus an IP allow-list if you want one.
  • A named contact on our side for the first few weeks, reachable on WhatsApp and phone.