My EMI Pay · QA / Dev
Replay the customer path with sample request and response bodies. Scratch phone 9876543210, product prod_personal, mock OTP 123456. After OTP verify, every customer URL needs Authorization: Bearer <accessToken>. Skip a step → 409 step_not_ready with requiredStep.
1500000. Never send rupees as a decimal.isNewUser is true./applications/{id}.revision from the last screen. Stale → 409 revision_conflict.cust_1735…, app_1735…. Failures look like { "code": "snake_case", "message": "…" }.Mock OTP is 123456 for every number. Use published product prod_personal. Tokens in the samples below are placeholders — copy live values from the last response.
| Phone | When to use | After OTP |
|---|---|---|
9000000001 |
Onboarding already finished | Customer auto-login, journey under_verification, PAN ACUPA7085R |
9000000002 |
Draft user — jump to begin-verification | User auto-login, next POST /applications/begin-verification |
9000000003 |
Family picker (two PANs) | No accessToken. POST /auth/accounts/select with cust_1700000000001 (Arjun / BQGPA1111A) or cust_1700000000002 (Sita / FWXPA2222B) |
9876543210 |
Scratch — full happy path from zero | New User, follow the steps below |
Call these in order. After step 4, send the Bearer on every customer request.
{
"ok": true
}
prod_personal
{
"products": [
{
"id": "prod_personal",
"name": "Personal loans",
"version": 1,
"minAmountPaise": 1000000,
"maxAmountPaise": 20000000,
"rateBps": 1400,
"tenorMonths": 12
}
]
}
{
"phone": "9876543210",
"product_id": "prod_personal"
}
Response 200
{
"ok": true
}
{
"phone": "9876543210",
"code": "123456",
"product_id": "prod_personal"
}
Response 200
{
"phoneSessionToken": "phone_session_…",
"accounts": [],
"canAddAccount": true,
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"refreshToken": "refresh_…",
"tokenType": "Bearer",
"expiresIn": 86400,
"identityKind": "user",
"userId": "user_1735123456789",
"customerId": "user_1735123456789",
"productId": "prod_personal",
"isNewUser": true,
"application": {
"application": { "id": "app_1735123456789", "reference": "PME-A1B2C3D4" },
"status": "started",
"youCanNow": [
{ "action": "begin_verification", "submitTo": "/applications/begin-verification" }
],
"revision": "1"
}
}
{
"applicationStatus": "started",
"isOnboardingFinished": false,
"revision": "1",
"current": {
"step": "begin_verification",
"method": "POST",
"path": "/applications/begin-verification"
},
"upcoming": {
"step": "update_profile",
"method": "POST",
"path": "/application/profile"
}
}
{ "email": "qa.scratch@example.com" }
POST /auth/email/verify/confirm → then GET /auth/email/verify/status
{ "token": "email_token_…" }
{ "verified": true, "email": "qa.scratch@example.com" }
{
"customerId": "user_1735123456789",
"phone": "9876543210",
"email": "qa.scratch@example.com",
"emailVerified": true,
"pan": null,
"fullName": null,
"dob": null,
"monthlyIncomePaise": null
}
POST /applications/begin-verification → 200
{
"status": "verifying",
"revision": "2",
"youCanNow": [
{ "action": "update_profile", "submitTo": "/application/profile" }
]
}
{
"fullName": "SCRATCH USER",
"dob": "01-01-1995",
"employmentType": "salaried",
"employerName": "QA Desk",
"monthlyIncomePaise": 14500000
}
{
"pan": "ABCDE1234F",
"redirectUrl": "https://myemipay.com/application/kyc/return"
}
GET /application/kyc/pan/status after DigiLocker → 200
{
"status": "resolved",
"verified": true,
"data": { "maskedPan": "XXXXXX234F", "documentType": "PAN" },
"identityKind": "customer",
"customerId": "cust_1735123456789",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"
}
{
"status": "ready",
"score": 719,
"activeAccounts": 10,
"overdueAccounts": 0,
"worstDpdDays": 0
}
POST /applications/acknowledge-credit-score → 200
{
"status": "verifying",
"revision": "3",
"summary": { "creditScore": "719" },
"youCanNow": []
}
{
"aadhaar": "999999999999",
"redirectUrl": "https://myemipay.com/application/kyc/return"
}
GET /application/kyc/aadhaar/status after DigiLocker, then GET /application/journey
{
"status": "resolved",
"verified": true,
"data": { "maskedAadhaar": "XXXXXXXX9999", "documentType": "AADHAAR" }
}
{
"isOnboardingFinished": true,
"current": { "step": "under_verification", "path": "/application/eligibility" }
}
Staff creates the offer. Bank and eSign are after accept — not during onboarding. 202 on payout is “request accepted”, not “money sent”.
{
"bureauClaimId": "claim_…",
"productVersion": 1,
"ruleSetId": "rules_personal",
"ruleSetVersion": 1,
"sanctionDecisionId": "sanction_…",
"amountPaise": 5000000
}
{ "eligible": true, "amountPaise": 5000000 }
POST /application/kyc/bank
{ "accountNumber": "123456789012", "ifsc": "HDFC0000001" }
POST /application/esign/start → poll GET /application/esign/status
POST /applications/create-loan → 201 { "loan": { "id": "loan_…" } }
POST /applications/request-payout → 202
POST /ops/dispatch-due (header X-Internal-Secret)
Prefer GET /application/journey → use current.method + current.path. Or GET /applications → youCanNow.
| Now | Use this | Description |
|---|---|---|
| no token | products → OTP request → verify | Login + auto-start |
started | POST /applications/begin-verification | Unlock KYC |
update_profile | POST /application/profile | Name / DOB / income before PAN |
kyc_pan | PAN start + status poll | DigiLocker PAN |
bureau | GET /application/bureau | Score for the next screen |
acknowledge_credit_score | POST /applications/acknowledge-credit-score | Customer saw the score |
kyc_aadhaar | Aadhaar start + status poll | Last-4 + DOB + name vs XML |
under_verification | wait; staff evaluate | Underwriting |
offer_ready | eligibility GET, then accept-offer | Show amount, take consent |
accepted | bank → esign → create-loan | After the offer |
| loan exists | request-payout, then ops dispatch | Disbursal |