BETA. The whole surface returns
404 unless LENDING_PLATFORM_ENABLED=true. Merchant routes use the merchant JWT; admin routes require a JWT with the SUPER_ADMIN role.Merchant-facing routes (/lending-application)
All routes require the merchant JWT (Authorization: Bearer <jwt>) and are ownership-checked.
Write routes marked KYB-gated require an approved KYB record.
Create draft
cohort is optional; when omitted, the cohort is resolved server-side from the
merchant’s KYB record. An explicit override is for operator-driven / Cohort-C manual drafts.
cohort, tier, and status: "DRAFT".
Update application
Submit / withdraw
Get document checklist
documentationCompleted.items[] (each item carries a
key + status; an item counts as uploaded when status === "UPLOADED").
Admin / lender routes (/admin/lending-application)
All routes require a JWT with the SUPER_ADMIN role.
Review queue
Defaults tostatus=UNDER_REVIEW, sorted by submittedAt ascending. limit is clamped to
1–500 (default 100).
Post decision
Credit-tier preview
A pure dry-run overCreditTierMappingService — no application lookup, no persistence.
tier, ceilingUsd, reason).
Errors
Standard NestJS error responses apply:401 (missing/invalid JWT), 403 (missing
SUPER_ADMIN role on admin routes), 404 (LENDING_PLATFORM_ENABLED off, or application not
found), and 422-class for an incomplete document checklist on submit.
Related: KYB cohorts
The 12 cohorts that drive the per-application doc checklist.