# FE note: `offer_cleared` (withdrawn loan offer)

When a reviewer declines a loan with a reason that clears the loan offer, the borrower has to redo
eligibility before booking again. Until they do, borrower-facing endpoints no longer return the old
limit. Instead they return `offer_cleared: true` and a message to show.

```json
"offer_cleared": true,
"offer_cleared_message": "Your loan offer was withdrawn after your last application was declined. Check your eligibility again to get a new offer."
```

Both fields are always present on the endpoints below. `offer_cleared` is `false` and the message
is `null` when nothing was cleared.

| Endpoint | Where the fields are | What is hidden while cleared |
| --- | --- | --- |
| `GET /api/v1/dashboard` | top level | `loan_offer` is `null` |
| `GET /api/v1/profile/eligibility-status` and `/eligibility-check` | top level | `report`, `admin_offer_amount`, `recommended_loan_amount` are `null` (they already were, because the eligibility steps are reset) |
| `POST /api/v1/loans/offer/details` (quote) | inside `loan_limits` | `loan_limits.monthly_amount` and `loan_limits.max_principal` are `null` |
| `POST /api/v1/loans/offer/details`, amount over the limit (422) | top level | `message` is the withdrawn-offer text, not the old limit |
| `GET /api/v1/affiliate/borrowers/{id}/resume` | inside `borrower` | `borrower.max_monthly_loan_amount` and `borrower.max_loan_amount` are `null` |

## What the app should do

- If `offer_cleared` is true, show `offer_cleared_message` where the limit normally goes, and send
  the borrower to the eligibility step (bank statement). The eligibility steps already show as not
  done, so the existing "complete eligibility" path works.
- Once a new statement analysis runs, or the offer is set again, `offer_cleared` goes back to
  `false` and the new limit shows. No app action is needed.

## Backward compatibility

Old app versions do not read the new fields. They see `loan_offer: null` or `null` limits. That is
the same as a borrower with no offer yet, which every client already handles. Booking is blocked
by the reset eligibility steps either way. This change is display only.

Admin screens (borrower page, bank statements, loan audit) still show the historical figures.
