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.| Phone | Who | After OTP verify |
|---|---|---|
9000000001 | Yaswanth — onboarding finished | one profile in accounts. POST /auth/accounts/select that id. Journey under_verification, PAN ACUPA7085R |
9000000002 | Draft User — no onboarding yet | accounts is empty (not linked until PAN). POST /auth/accounts for the token. Journey begin_verification |
9000000003 | Same number, two PANs | two profiles, no token. Select cust_1700000000001 (Arjun / BQGPA1111A) or cust_1700000000002 (Sita / FWXPA2222B) |
9876543210 | Scratch | empty list. POST /auth/accounts starts the User and the application |
1500000. Never send rupees as a decimal.cust_1735…, app_1735… — not UUID-shaped. Screen reference PME-XXXXXXXX.{ "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.POST /auth/accounts or POST /auth/accounts/select starts or resumes the case. OTP verify does not.| Who | How | What to use |
|---|---|---|
| Anyone | no login | Health, Products, OTP, token refresh |
| Customer | Bearer accessToken | Profile, Applications, Journey, email verify |
| Ops | X-Internal-Secret | dispatch-due, poll-timers, redrive |
| Vendor | signed webhook | /webhooks/* |
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.200 body. Tokens below are placeholders — copy live values from the last response.GET /health{
"success": true,
"message": "OK",
"data": {
"ok": true
}
}prod_personalproduct_id. Unknown id → invalid_product.GET /products{
"success": true,
"message": "OK",
"data": {
"products": [
{
"id": "prod_personal",
"name": "Personal loans",
"version": 1,
"minAmountPaise": 500000,
"maxAmountPaise": 2500000,
"rateBps": 2400,
"tenorMonths": 1
}
]
}
}prod_personal as product_id.123456.POST /auth/otp/request{
"phone": "9876543210",
"product_id": "prod_personal"
}{
"success": true,
"message": "OK",
"data": {
"message": "OTP has been sent to 9876543210 successfully"
}
}product_id.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"
}{
"success": true,
"message": "OK",
"data": {
"phoneSessionToken": "phone_session_…",
"accounts": [],
"canAddAccount": true
}
}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.accounts → add. One or more profiles → select that id.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_…"
}{
"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
}
}accounts is not empty, send POST /auth/accounts/select with the same phoneSessionToken plus accountId. Save accessToken. The open application is GET /application.current.method + current.path.GET /application/journey{
"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"
}
}
}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"
}{
"success": true,
"message": "OK",
"data": {
"ok": true
}
}POST /auth/email/verify/confirm{
"token": "email_token_…"
}{
"success": true,
"message": "OK",
"data": {
"ok": true,
"email": "qa.scratch@example.com"
}
}GET /auth/email/verify/status{
"success": true,
"message": "OK",
"data": {
"verified": true,
"email": "qa.scratch@example.com"
}
}null means unknown, not “field missing”. POST is blocked until begin-verification.GET /application/profile{
"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
}
}
}current.step is begin_verification.started → verifying. KYC is not allowed before this.GET /application{
"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{}{
"success": true,
"message": "OK",
"data": {
"application": {
"id": "app_1735123456789",
"reference": "PME-A1B2C3D4"
},
"status": "verifying",
"message": "We are verifying your details.",
"revision": "2"
}
}update_profile (after begin-verification, before PAN).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
}{
"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
}
}
}kyc_pan after the profile is complete.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"
}{
"success": true,
"message": "OK",
"data": {
"status": "pending",
"url": "https://digilocker.meripehchaan.gov.in/public/oauth2/1/authorize?…"
}
}GET /application/kyc/status (after DigiLocker){
"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"
}
}score is present. Calling this before company_details returns 409 step_not_ready.credit_score_not_ready.GET /application/bureau{
"success": true,
"message": "OK",
"data": {
"status": "ready",
"score": 719,
"activeAccounts": 10,
"activeEmis": 2,
"activeCreditCards": 1,
"overdueAccounts": 0,
"worstDpdDays": 0
}
}POST /application/acknowledge-credit-score{}{
"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"
}
}POST /application/kyc. Next is location, then company details, then the credit check. Onboarding finishes later, at the bank link or statement.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"
}{
"success": true,
"message": "OK",
"data": {
"status": "pending",
"url": "https://digilocker.meripehchaan.gov.in/public/oauth2/1/authorize?…"
}
}GET /application/kyc/status (after DigiLocker){
"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{
"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"
}
}
}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.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{
"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 {}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 XMLPOST /application/request-payout with { "loanId": "loan_…" } → HTTP 202POST /ops/dispatch-due with X-Internal-Secret (when money lands, one confirmation email if they verified an address)GET /application/journey → use current.method + current.path.| Now | Use this | Description |
|---|---|---|
| no token | products → OTP request → verify → select or add account | Profiles, then the Bearer session |
started | POST /application/begin-verification | Unlock KYC |
update_profile | POST /application/profile | Name and date of birth. Prefill may already have them |
kyc | POST /application/kyc or POST /application/verify-pan, then status. After 3 failures POST /application/kyc/upload | PAN and Aadhaar |
geolocation | POST /application/geolocation | Device pin must match the saved address |
company_details | POST /application/company | Employment type, employer name, and monthly income in paise. All three required |
bureau | GET /application/bureau | Score for the next screen |
acknowledge_credit_score | POST /application/acknowledge-credit-score | Customer saw the score; the published rule floor is 600 on the current set |
account_aggregation / income_proof | consent, or POST /application/income/proof (PDF) after 2 failures | Bank link or the statement |
under_verification | poll journey for about 10 seconds | Offer appears when the score clears the floor |
accept_offer | eligibility GET, then accept-offer | Show amount, rate, tenure, and total to repay |
kyc_bank | POST /application/kyc/bank | Account name must match PAN before signing |
esign then enach | sign, then auto-debit, poll each status | Agreement, then the repayment mandate |
create_loan | POST /application/create-loan | One loan account for this application |
video_kyc | POST /application/kyc/liveness | Live selfie. Probes POST /application/vkyc/liveness and POST /application/vkyc/face-match do not finish the step |
request_payout | request-payout, then ops dispatch-due | Ask for the money, then confirm it arrived |
GET /application before a write that needs revision.POST /webhooks/bureau|kyc|esign|income with a signature. claimId is in the body.POST /ops/redrive/{handlerRowId} then dispatch-due again.| Value | Comes from | Used for |
|---|---|---|
product_id | GET /products | OTP body |
phoneSessionToken | OTP verify | select or add a profile |
accountId | accounts[0].id on OTP verify | POST /auth/accounts/select |
accessToken / refreshToken / customerId | select, add account, refresh | login |
applicationId / revision | GET /application, GET /application/revision, journey | writes |
url | KYC start/status | open DigiLocker |
claimId | webhooks, bureau status | claim follow-up |
loanId / payoutRequestId | create-loan, request-payout | payout |
journeyCurrent / journeyUpcoming | GET /application/journey | next step |
lastErrorCode | any error JSON | debug |