My EMI Pay
    • My-EMI Lending API
    • System
      • Health check
        GET
    • Products
      • List published loan products
        GET
    • Auth
      • List family profiles on this phone
        GET
      • Add a family member on this phone
        POST
      • iOS Universal Link file
        GET
      • Select a family account after OTP
        POST
      • Android App Links file
        GET
      • Confirm email verification (Bearer)
        GET
      • Confirm email verification token (Bearer)
        POST
      • Send email verification link
        POST
      • Email verification status
        GET
      • Logout
        POST
      • Request OTP
        POST
      • Resend OTP
        POST
      • Verify OTP
        POST
      • Refresh tokens
        POST
    • Profile
      • Record area pincode from location
        POST
      • Get customer profile
        GET
      • Update customer profile
        POST
    • Application journey
      • HTML origination document pack
        GET
      • Customer's stored accounts
        GET
      • Start bank statement consent
        POST
      • Profile from the signed-in phone
        GET
      • Poll bank statement consent
        GET
      • Unfinished advance
        GET
      • Start PAN KYC via DigiLocker
        POST
      • PAN KYC status
        GET
      • Start Aadhaar KYC via DigiLocker
        POST
      • Application journey
        GET
      • Aadhaar KYC status
        GET
      • Start DigiLocker KYC
        POST
      • Edit Aadhaar communication address
        POST
      • DigiLocker KYC status
        GET
      • Upload PAN and Aadhaar PDFs
        POST
      • Verify bank account (KYC)
        POST
      • Complete PAN KYC (poll DigiLocker)
        POST
      • Complete Aadhaar KYC (poll DigiLocker)
        POST
      • Selfie liveness check (KYC)
        POST
      • Pull bureau report
        POST
      • Selfie liveness probe
        POST
      • Selfie face-match probe
        POST
      • Start eSign
        POST
      • Loan eligibility
        GET
      • eSign status
        GET
      • Start e-NACH
        POST
      • e-NACH status
        GET
      • PAN and address from the signed-in phone
        GET
      • Save company details
        POST
      • Upload a bank statement PDF
        POST
      • Bureau report
        GET
      • Price an advance
        POST
      • Stream application status (SSE)
        GET
      • List loan PDFs
        GET
      • One loan document link
        GET
      • Penny-drop the salary account
        POST
    • Webhooks
      • Accept a servicing action from the LMS
      • Mandate and debit status
      • Resolve or fail bureau claim
      • Cashfree payout, subscription, and payment events
      • Easebuzz EMI payment result
      • Resolve or fail eSign claim
      • Resolve or fail income claim
      • Resolve or fail KYC claim
      • Cashfree payout status
    • Ops
      • Confirm queued payouts
      • Wake steps that are waiting on a clock
      • Retry one failed payout row
    • Other
      • List published originators
      • HTML origination pack for one originator
      • List banks
      • Bank account rule
    • Application
      • Permanently delete one user
      • Get current application screen
      • JSON origination document pack
      • Accept offer
      • List EMIs for this customer
      • Begin verification
      • Create loan
      • Past applications
      • Verify PAN and pull the credit file
      • Acknowledge credit score
      • Key Facts Statement
      • Current application revision
      • Request payout
      • Open UPI or netbanking for one instalment
      • Loan details
      • Transaction details
    • Applications
      • Get current application screen
      • Begin verification
      • Verify PAN
      • Acknowledge credit score
      • Accept offer
      • Create loan
      • Request payout
    • Collection
      • Notify borrower before collection
      • Refresh notification status
      • Present collection debit
      • Cancel a due presentment and mandate
      • Refresh debit status
      • Read collection request
    • PII tools
      • Encrypt a value
      • Decrypt a value
      • Generate a cipher key

    My-EMI Lending API

    What the borrower does, in order: pick a loan, prove their mobile number, share who they are, see their credit score, verify Aadhaar, wait a few seconds, see an offer, accept it, add a bank account, sign, set up auto-debit, and ask for the money. The money shows as arrived only after an internal confirmation.
    Technical: after login, every customer call sends Authorization: Bearer <accessToken>. Skipping a screen returns 409 step_not_ready and requiredStep (the screen that is still unfinished). Amounts are integer paise: ₹2,00,000 = 20000000.
    Start a run from Customer happy flow below: GET /health → GET /products → OTP request → OTP verify → POST /auth/accounts (or select). Then stay on the access token.

    QA dummy phones#

    PhoneWhoAfter OTP verify
    9000000001Yaswanth — onboarding finishedone profile in accounts. POST /auth/accounts/select that id. Journey under_verification, PAN ACUPA7085R
    9000000002Draft User — no onboarding yetaccounts is empty (not linked until PAN). POST /auth/accounts for the token. Journey begin_verification
    9000000003Same number, two PANstwo profiles, no token. Select cust_1700000000001 (Arjun / BQGPA1111A) or cust_1700000000002 (Sita / FWXPA2222B)
    9876543210Scratchempty list. POST /auth/accounts starts the User and the application

    Ground rules#

    Money is integer paise. ₹15,000 = 1500000. Never send rupees as a decimal.
    Ids look like cust_1735…, app_1735… — not UUID-shaped. Screen reference PME-XXXXXXXX.
    Success is { "success": true, "message": "OK", "data": { ... } }. Failure is { "success": false, "data": null, "error": { "code": "snake_case", "message": "plain English" } }. Extra facts (requiredStep, remainingDays) sit on error. Customer rejections (reapply_cooldown, ineligible) also send title and reason for the screen. HTML pages stay HTML.- Revision: application writes need a fresh revision from the last screen. Stale → 409 revision_conflict. Refresh GET /application before a write.
    There is no create-application API. POST /auth/accounts or POST /auth/accounts/select starts or resumes the case. OTP verify does not.
    Customer URLs have no application id. The session picks the open application.

    Who calls what#

    WhoHowWhat to use
    Anyoneno loginHealth, Products, OTP, token refresh
    CustomerBearer accessTokenProfile, Applications, Journey, email verify
    OpsX-Internal-Secretdispatch-due, poll-timers, redrive
    Vendorsigned webhook/webhooks/*

    Customer happy flow#

    Scratch number 9876543210, product prod_personal, mock OTP 123456. Replay these calls in order. OTP verify does not return a Bearer token. After POST /auth/accounts, every customer URL needs Authorization: Bearer <accessToken>. Skip a step → 409 step_not_ready with requiredStep.
    Each step: Usage (when), Description (why this call), then a sample request and 200 body. Tokens below are placeholders — copy live values from the last response.

    1. Health — is this host up?#

    Usage: first request after pointing Apidog at a host.
    Description: wrong host looks like “login is broken”. This only proves the Node process is listening.
    → GET /health
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "ok": true
      }
    }

    2. Products — pick prod_personal#

    Usage: before OTP, on the product-picker screen.
    Description: every OTP is tied to a published product_id. Unknown id → invalid_product.
    → GET /products
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "products": [
          {
            "id": "prod_personal",
            "name": "Personal loans",
            "version": 1,
            "minAmountPaise": 500000,
            "maxAmountPaise": 2500000,
            "rateBps": 2400,
            "tenorMonths": 1
          }
        ]
      }
    }
    Next: send prod_personal as product_id.

    3. OTP request#

    Usage: customer picked a product and typed a phone.
    Description: a one-time code is stored. It is not in the JSON. Mock code is 123456.
    → POST /auth/otp/request
    {
      "phone": "9876543210",
      "product_id": "prod_personal"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "message": "OTP has been sent to 9876543210 successfully"
      }
    }

    4. OTP verify — profiles on this phone#

    Usage: immediately after the customer types the OTP. Same phone + same product_id.
    Description: returns phoneSessionToken and accounts. No Bearer token. Pick a profile with POST /auth/accounts/select. Empty list → POST /auth/accounts starts one and returns the token.
    → POST /auth/otp/verify
    {
      "phone": "9876543210",
      "code": "123456",
      "product_id": "prod_personal"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "phoneSessionToken": "phone_session_…",
        "accounts": [],
        "canAddAccount": true
      }
    }
    Save phoneSessionToken. Scratch 9876543210 has an empty accounts list, so the next call is POST /auth/accounts. A number that already has profiles uses POST /auth/accounts/select with accounts[].id.

    5. Start or pick a profile — this issues the token#

    Usage: immediately after OTP verify. Empty accounts → add. One or more profiles → select that id.
    Description: OTP only proved the phone. This call returns accessToken, refreshToken, customerId, productId, and isNewUser, and starts or resumes the application. Too soon after a finished case → reapply_cooldown with remainingDays, title, and reason.
    → POST /auth/accounts (empty list)
    {
      "phoneSessionToken": "phone_session_…"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "phoneSessionToken": "phone_session_…",
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
        "refreshToken": "refresh_…",
        "tokenType": "Bearer",
        "expiresIn": 86400,
        "identityKind": "user",
        "userId": "user_1735123456789",
        "customerId": "user_1735123456789",
        "productId": "prod_personal",
        "isNewUser": true
      }
    }
    When accounts is not empty, send POST /auth/accounts/select with the same phoneSessionToken plus accountId. Save accessToken. The open application is GET /application.

    6. Journey — what to use next#

    Usage: after the Bearer session exists, and after every successful write.
    Description: do not guess the next URL. Use current.method + current.path.
    → GET /application/journey
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "application": {
          "id": "app_1735123456789",
          "reference": "PME-A1B2C3D4"
        },
        "revision": "1",
        "applicationStatus": "started",
        "isOnboardingFinished": false,
        "current": {
          "step": "begin_verification",
          "title": "Begin verification",
          "status": "in_progress",
          "method": "POST",
          "path": "/application/begin-verification"
        },
        "upcoming": {
          "step": "update_profile",
          "title": "Update customer profile",
          "status": "pending",
          "method": "POST",
          "path": "/application/profile"
        }
      }
    }

    7. Email (optional to log in; required if you collect email)#

    Usage: after login, when the app has an email. Not required to start KYC.
    Description: Start stores the address on the profile and customer row with emailVerified: false. Confirm sets emailVerified: true. Profile POST does not take email. The token is emailed — it is not in the start JSON. Dev/mock: copy it from the mail / server log.
    → POST /auth/email/verify/start
    {
      "email": "qa.scratch@example.com"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "ok": true
      }
    }
    → POST /auth/email/verify/confirm
    {
      "token": "email_token_…"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "ok": true,
        "email": "qa.scratch@example.com"
      }
    }
    → GET /auth/email/verify/status
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "verified": true,
        "email": "qa.scratch@example.com"
      }
    }

    8. Profile GET — bind the form#

    Usage: as soon as you have a token.
    Description: pre-populate the form. null means unknown, not “field missing”. POST is blocked until begin-verification.
    → GET /application/profile
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "customerId": "user_1735123456789",
        "phone": "9876543210",
        "email": "qa.scratch@example.com",
        "emailVerified": true,
        "fullName": null,
        "dob": null,
        "address": null,
        "employmentType": null,
        "employerName": null,
        "monthlyIncomePaise": null,
        "creditScore": null,
        "kyc": {
          "pan": { "value": null, "isVerified": false },
          "aadhaar": { "value": null, "isVerified": false },
          "fullName": null,
          "dateOfBirth": null,
          "address": null
        }
      }
    }

    9. Screen GET, then begin verification#

    Usage: journey current.step is begin_verification.
    Description: started → verifying. KYC is not allowed before this.
    → GET /application
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "application": {
          "id": "app_1735123456789",
          "reference": "PME-A1B2C3D4"
        },
        "status": "started",
        "message": "Your application has been started.",
        "revision": "1"
      }
    }
    → POST /application/begin-verification
    {}
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "application": {
          "id": "app_1735123456789",
          "reference": "PME-A1B2C3D4"
        },
        "status": "verifying",
        "message": "We are verifying your details.",
        "revision": "2"
      }
    }

    10. Profile POST — name / DOB / work / income#

    Usage: journey step update_profile (after begin-verification, before PAN).
    Description: PAN/Aadhaar matching and later bank-name check need these on file. dob is dd-mm-yyyy. Income is integer paise (₹1,45,000 = 14500000).
    → POST /application/profile
    {
      "fullName": "SCRATCH USER",
      "dob": "01-01-1995",
      "employmentType": "salaried",
      "employerName": "QA Desk",
      "monthlyIncomePaise": 14500000
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "customerId": "user_1735123456789",
        "phone": "9876543210",
        "email": "qa.scratch@example.com",
        "emailVerified": true,
        "fullName": "SCRATCH USER",
        "dob": "01-01-1995",
        "address": null,
        "employmentType": "salaried",
        "employerName": "QA Desk",
        "monthlyIncomePaise": 14500000,
        "creditScore": null,
        "kyc": {
          "pan": { "value": null, "isVerified": false },
          "aadhaar": { "value": null, "isVerified": false },
          "fullName": null,
          "dateOfBirth": null,
          "address": null
        }
      }
    }

    11. PAN DigiLocker#

    Usage: journey kyc_pan after the profile is complete.
    Description: open url, finish consent, then poll status until resolved + verified. If this PAN is already saved on another customer, start returns 409 pan_already_exists and does not open DigiLocker. error.maskedPhone is present when we still have that phone. If the locker has no PAN, status stays pending and returns url again. After verify, tokens may rotate from User → Customer — save the new Bearer.
    → POST /application/kyc with { pan }
    {
      "pan": "ABCDE1234F",
      "redirectUrl": "https://myemipay.com/__callback/kyc"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "status": "pending",
        "url": "https://digilocker.meripehchaan.gov.in/public/oauth2/1/authorize?…"
      }
    }
    → GET /application/kyc/status (after DigiLocker)
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "status": "resolved",
        "verified": true,
        "data": {
          "fullName": "SCRATCH USER",
          "maskedPan": "e1.<sealed PAN>",
          "dateOfBirth": "01-01-1995",
          "documentType": "PAN"
        },
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
        "refreshToken": "refresh_…",
        "tokenType": "Bearer",
        "expiresIn": 86400,
        "identityKind": "customer",
        "customerId": "cust_1735123456789",
        "productId": "prod_personal"
      }
    }

    12. Bureau score, then acknowledge#

    Usage: after Aadhaar, location, and company details. Acknowledge only when score is present. Calling this before company_details returns 409 step_not_ready.
    Description: the credit-score screen. This is not an offer. Acknowledge too early → credit_score_not_ready.
    → GET /application/bureau
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "status": "ready",
        "score": 719,
        "activeAccounts": 10,
        "activeEmis": 2,
        "activeCreditCards": 1,
        "overdueAccounts": 0,
        "worstDpdDays": 0
      }
    }
    → POST /application/acknowledge-credit-score
    {}
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "application": {
          "id": "app_1735123456789",
          "reference": "PME-A1B2C3D4"
        },
        "status": "verifying",
        "message": "We are preparing your loan offer.",
        "summary": {
          "creditScore": "719",
          "activeAccounts": "10",
          "worstDpdDays": "0"
        },
        "revision": "3"
      }
    }

    13. Aadhaar DigiLocker#

    Usage: right after PAN, on the same POST /application/kyc. Next is location, then company details, then the credit check. Onboarding finishes later, at the bank link or statement.
    Description: if this Aadhaar is already saved on another customer, start returns 409 aadhaar_already_exists and does not open DigiLocker. error.maskedPhone is present when we still have that phone. Otherwise it is matched to entered last-4, profile DOB, and profile name. When Aadhaar is verified, journey current is geolocation.
    → POST /application/kyc with { aadhaar }
    {
      "aadhaar": "999999999999",
      "redirectUrl": "https://myemipay.com/__callback/kyc"
    }
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "status": "pending",
        "url": "https://digilocker.meripehchaan.gov.in/public/oauth2/1/authorize?…"
      }
    }
    → GET /application/kyc/status (after DigiLocker)
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "status": "resolved",
        "verified": true,
        "data": {
          "fullName": "Scratch User",
          "address": "1 QA Street, Hyderabad, Telangana, 500001, India",
          "maskedAadhaar": "e1.<sealed Aadhaar>",
          "dateOfBirth": "01-01-1995",
          "documentType": "AADHAAR",
          "canEditAddress": true
        }
      }
    }
    → GET /application/journey
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "application": {
          "id": "app_1735123456789",
          "reference": "PME-A1B2C3D4"
        },
        "revision": "3",
        "applicationStatus": "verifying",
        "isOnboardingFinished": false,
        "current": {
          "step": "geolocation",
          "title": "Check location",
          "status": "in_progress",
          "method": "POST",
          "path": "/application/geolocation"
        },
        "upcoming": {
          "step": "company_details",
          "title": "Company details",
          "status": "pending",
          "method": "POST",
          "path": "/application/company"
        }
      }
    }
    Next is POST /application/geolocation (purpose: onboarding). The device pin must match the pincode on the saved address. Then POST /application/company with employmentType, employerName, and monthlyIncomePaise, then section 12 (credit check and acknowledge). After the bank link or statement, keep polling GET /application/journey for about 10 seconds. The customer stays on Under verification. When the credit score is at least the published rule floor (600 on the current set) and a published underwriting rule exists, the screen moves to the offer on its own. The offered amount is that product's maximum. If the screen never leaves Under verification, no rule is published, so no offer can be made. A score below the floor rejects the application on acknowledge.

    14. The offer — what they can borrow#

    What the customer sees: loan amount, interest, tenure, estimated EMI, and total to repay. They accept.
    Technical: GET /application/eligibility then, when journey current.step is accept_offer, POST /application/accept-offer. Amounts are paise. A personal loan at the product maximum is ₹2,00,000 (20000000) for 12 months at 14% (interestRateBps: 1400). The same numbers are on GET /application/kfs.
    → GET /application/eligibility
    HTTP 200
    {
      "success": true,
      "message": "OK",
      "data": {
        "eligible": true,
        "amountPaise": 20000000,
        "keyFacts": {
          "loanAmountPaise": 20000000,
          "totalToRepayPaise": 22800000,
          "interestRatePercentage": 14,
          "tenorMonths": 12,
          "estimatedEmiPaise": 1900000
        }
      }
    }
    → POST /application/accept-offer with {}

    15. After accept — bank, sign, auto-debit, loan, money#

    What the customer sees: add the account the money should reach, sign the agreement, allow auto-debit, then ask for the money. The app shows the payout as on the way until it arrives.
    Technical: do these in order. Signing before the bank check is finished returns 409 step_not_ready / requiredStep: kyc_bank. The bank check is a penny-less name match against PAN. The account number is 9–18 digits. IFSC looks like HDFC0001234 (5th character is 0). 202 on payout means the request was accepted, not that money moved. Confirm with POST /ops/dispatch-due and header X-Internal-Secret, then poll GET /application until payout.status is arrived or failed.
    → POST /application/kyc/bank { "accountNumber": "123456789012", "ifsc": "HDFC0000001" }
    → POST /application/esign/start (poll GET /application/esign/status)
    → POST /application/enach/start with {} (poll GET /application/enach/status)
    → POST /application/create-loan → HTTP 201 { "loan": { "id": "loan_…", "status": "…" } }
    → POST /application/kyc/liveness with the photo file (image/jpeg). The server converts it. Aadhaar photo is read from the saved XML
    → POST /application/request-payout with { "loanId": "loan_…" } → HTTP 202
    → ops POST /ops/dispatch-due with X-Internal-Secret (when money lands, one confirmation email if they verified an address)

    How to pick the next API#

    Prefer GET /application/journey → use current.method + current.path.
    NowUse thisDescription
    no tokenproducts → OTP request → verify → select or add accountProfiles, then the Bearer session
    startedPOST /application/begin-verificationUnlock KYC
    update_profilePOST /application/profileName and date of birth. Prefill may already have them
    kycPOST /application/kyc or POST /application/verify-pan, then status. After 3 failures POST /application/kyc/uploadPAN and Aadhaar
    geolocationPOST /application/geolocationDevice pin must match the saved address
    company_detailsPOST /application/companyEmployment type, employer name, and monthly income in paise. All three required
    bureauGET /application/bureauScore for the next screen
    acknowledge_credit_scorePOST /application/acknowledge-credit-scoreCustomer saw the score; the published rule floor is 600 on the current set
    account_aggregation / income_proofconsent, or POST /application/income/proof (PDF) after 2 failuresBank link or the statement
    under_verificationpoll journey for about 10 secondsOffer appears when the score clears the floor
    accept_offereligibility GET, then accept-offerShow amount, rate, tenure, and total to repay
    kyc_bankPOST /application/kyc/bankAccount name must match PAN before signing
    esign then enachsign, then auto-debit, poll each statusAgreement, then the repayment mandate
    create_loanPOST /application/create-loanOne loan account for this application
    video_kycPOST /application/kyc/livenessLive selfie. Probes POST /application/vkyc/liveness and POST /application/vkyc/face-match do not finish the step
    request_payoutrequest-payout, then ops dispatch-dueAsk for the money, then confirm it arrived
    Refresh GET /application before a write that needs revision.

    Other flows#

    Vendor callbacks: POST /webhooks/bureau|kyc|esign|income with a signature. claimId is in the body.
    Stuck payout: POST /ops/redrive/{handlerRowId} then dispatch-due again.

    Values saved after a good response#

    ValueComes fromUsed for
    product_idGET /productsOTP body
    phoneSessionTokenOTP verifyselect or add a profile
    accountIdaccounts[0].id on OTP verifyPOST /auth/accounts/select
    accessToken / refreshToken / customerIdselect, add account, refreshlogin
    applicationId / revisionGET /application, GET /application/revision, journeywrites
    urlKYC start/statusopen DigiLocker
    claimIdwebhooks, bureau statusclaim follow-up
    loanId / payoutRequestIdcreate-loan, request-payoutpayout
    journeyCurrent / journeyUpcomingGET /application/journeynext step
    lastErrorCodeany error JSONdebug
    Modified at 2026-11-04 21:33:56
    Next
    System
    Built with