KRYSTALM7 opened a new issue, #154:
URL: https://github.com/apache/fineract-loan-origination/issues/154

   ## Problem
   
   The LOS disbursement flow currently fails when the real Fineract adapter is 
enabled.
   
   An approved LOS application cannot complete the real Fineract loan lifecycle.
   
   The observed flow is:
   
   1. Loan application created.
   2. Application approved by Loan Officer and Branch Manager.
   3. Real Fineract integration enabled.
   4. Disbursement requested.
   5. LOS returns `HTTP 502`.
   6. LOS application remains `APPROVED`.
   7. No Fineract loan is created.
   
   ## Runtime Evidence
   
   For application:
   
   `LOS-2026-00023`
   
   The following conditions were observed:
   
   - Fineract health endpoint returned `200`.
   - Fineract client lookup succeeded.
   - Application was approved.
   - Disbursement returned `HTTP 502`.
   - `fineractLoanId` remained `null`.
   - No corresponding new loan was present in Fineract.
   
   ## Root Cause
   
   The exact root cause is not yet confirmed.
   
   The failure occurs during the real Fineract integration flow and may be 
caused by one of the following:
   
   - Incorrect Fineract tenant header.
   - Loan creation payload not matching the target Fineract API contract.
   - Fineract service-account authentication/configuration.
   - Another Fineract API validation error.
   
   The 502 response body should be captured to identify the exact failure.
   
   ## Proposed Investigation
   
   1. Re-run the disbursement using `curl -i`.
   2. Capture the complete 502 response body.
   3. Send the generated loan creation payload directly to Fineract.
   4. Verify the tenant header expected by the running Fineract version.
   5. Verify the payload against the target Fineract API contract.
   6. Document the Fineract version used for integration testing.
   
   ## Acceptance Criteria
   
   - [ ] Root cause of the 502 is identified and documented.
   - [ ] Approved LOS application successfully creates a loan in real Fineract.
   - [ ] The loan is approved in Fineract.
   - [ ] The loan is disbursed in Fineract.
   - [ ] LOS stores the resulting Fineract loan ID.
   - [ ] LOS application transitions to `DISBURSED`.
   - [ ] Fineract contains the corresponding active/disbursed loan.
   - [ ] Integration errors identify which Fineract operation failed.
   
   ## Dependencies 
   None.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to