Skip to content
Developer guide

Read loans and initiate withdrawals

Browse developer guides

Find the loan through GET /api/Loan/get-customer-loans/{customerId} and retain its id and applicationId. Most loan routes require bearer authentication. The early-repayment route is explicitly anonymous, but still requires a valid loan ID.

Read balances and activity

Read total balance, repayments, transactions and withdrawals using the same loan ID. The paged transaction and withdrawal routes return data and totalCount; follow pagination.

The get-loan Swagger response is named Loan, while its current handler returns LoanResponse. Use the fields actually needed by your integration and verify generated-client behavior for this discrepancy. The customer-loans list declares LoanResponse[].

Start an invoice withdrawal

  1. Call POST /api/Calculation/application-invoice-calculation?applicationId=<applicationId> for the application associated with the loan.
  2. Call POST /api/Loan/make-withdrawal-invoice/{loanId} with a calculation object containing the same requested amount and calculation inputs. The amount is checked against the stored calculation and available balance.
  3. Present the returned withdrawal details and obtain the OTP sent through the configured channel.
  4. Call POST /api/Loan/confirm-withdrawal-invoice/{loanId} with the agreed amount, returned advance rate, requested dateUTC and the entered OTP.
{
  "calculation": {
    "amount": 5000,
    "percentOfIncome": 0,
    "terms": 12,
    "fixedRepaymentCalculation": false
  }
}

This is the start-request shape. Confirmation uses WithdrawInvoiceRequestData, not the nested calculation object. Its response is GuidApiResponse; inspect the HTTP result and response fields, then reconcile loan activity before treating an uncertain result as complete.

Line-of-credit withdrawal availability

The API exposes LOC calculation and make-withdrawal-line-of-credit, which initiates the OTP step. The current Swagger does not expose a LOC confirmation route, and its controller implementation is disabled. Confirm the supported completion process with Plexe before initiating a LOC withdrawal integration; this API currently does not document an end-to-end LOC confirmation flow.

Resend an OTP deliberately

POST /api/Loan/resend-withdrawal-otp/{loanId} requests another OTP and returns a GUID. The response is not the OTP itself. Avoid automatic retries of start, confirm or resend operations because they can send messages or cause financial actions.

Endpoint reference

MethodRouteInputsSwagger success
GET/api/Loan/get-loan/{loanId}path: loanId (required)200: Loan
GET/api/Loan/get-customer-loans/{customerId}path: customerId (required)200: LoanResponse[]
GET/api/Loan/get-transactions/{loanId}path: loanId (required); query: skip; query: take200: Transaction[]
GET/api/Loan/get-transactions-paged/{loanId}path: loanId (required); query: skip; query: take; query: descending200: PagedListTransactionResponse
GET/api/Loan/get-withdrawals/{loanId}path: loanId (required); query: skip; query: take; query: descending200: PagedListAdvanceProjectionResponse
GET/api/Loan/get-contract-documents/{loanId}path: loanId (required)200: ContractDocumentResponse[]
GET/api/Loan/get-total-balance/{loanId}path: loanId (required)200: LoanBalanceResponse
GET/api/Loan/get-repayment-balances/{loanId}path: loanId (required)200: DashboardLoanRepaymentResponse
POST/api/Loan/make-withdrawal-line-of-credit/{loanId}path: loanId (required); body: body — LineOfCreditWithdrawalRequest200: LineOfCreditWithdrawalResponse
POST/api/Loan/make-withdrawal-invoice/{loanId}path: loanId (required); body: body — InvoiceWithdrawalRequest200: InvoiceWithdrawalResponse
POST/api/Loan/resend-withdrawal-otp/{loanId}path: loanId (required)200: string (uuid)
POST/api/Loan/confirm-withdrawal-invoice/{loanId}path: loanId (required); body: body — WithdrawInvoiceRequestData200: GuidApiResponse
GET/api/Loan/is-loan-enabled/{loanId}path: loanId (required)200: boolean
GET/api/Loan/is-loan-closed/{loanId}path: loanId (required)200: boolean
GET/api/Loan/get-early-repayment/{loanId}path: loanId (required)200: EarlyRepaymentResponse