> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capcells.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Record a withdrawal

> Record that the borrower withdrew inside a window you name. No interest and no fee.

A withdrawal records that the borrower withdrew inside a window the sale gave them — a ticket cancelled at no cost. The Loan reads `withdrawn` and is undone as [a rescission](/api-reference/loans/rescission) undoes it: no interest and no fee from the anchor, everything received owed back by receipt, no money from the act's date.

You state the window, in days from the anchor. The Platform checks the date against it and asserts nothing about the law it comes from — see [Mexico](/lending/mexico).

## Path parameters

<ParamField path="tenant_id" type="string" required>
  The Tenancy acting.
</ParamField>

<ParamField path="loan_id" type="string" required>
  The Loan. Another Tenancy's and one that never existed are both `404`.
</ParamField>

## Body

<ParamField body="on" type="string" required>
  The day the borrower withdrew. No later than the anchor plus `window_days`.
</ParamField>

<ParamField body="window_days" type="integer" required>
  The window, in days from the anchor. Part of what a retry restates.
</ParamField>

<ParamField body="reference" type="string" required>
  Your name for the act, in the one act namespace of the Tenancy.
</ParamField>

<ParamField body="actor" type="string" required>
  Whoever acted, your own reference.
</ParamField>

<ParamField body="basis" type="string" required>
  Why, in your words.
</ParamField>

<ParamField body="context" type="object">
  Stored, echoed beside the fact, read by nothing.
</ParamField>

## Response

`201` with [the whole Loan](/api-reference/loans/read): `state` reads `withdrawn`, and the event carries `window_days`. Retry `200`.

## Refusals

| Condition | Status and code | What clears it |
| - | - | - |
| `on` is after the window | <Badge color="orange">422</Badge> `outside_withdrawal_window` | Nothing — it is not a withdrawal |
| The Loan is ceded or written off | <Badge color="red">409</Badge> `cession_in_force`, `write_off_in_force` | Retract that fact |
| A rescission, void or withdrawal stands | <Badge color="red">409</Badge> `undone` | Retract it |

<RequestExample>
  ```bash Record a withdrawal theme={null}
  BODY='{
    "on": "2026-08-12",
    "window_days": 7,
    "reference": "withdraw-0001",
    "actor": "ops-0007",
    "basis": "ticket cancelled inside the cooling-off window"
  }'

  curl -X POST "https://api.capcells.com/v1/tenants/$TENANT_ID/loans/$LOAN_ID/withdrawal" \
    -H "Authorization: $(capcells_sign "$CAPCELLS_API_KEY" POST "/v1/tenants/$TENANT_ID/loans/$LOAN_ID/withdrawal" "$BODY")" \
    -H "Content-Type: application/json" \
    -d "$BODY"
  ```
</RequestExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.