Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | UseSettlementsOptions | No | Filter and pagination options. |
UseSettlementsOptions
| Property | Type | Default | Description |
|---|---|---|---|
state | string | - | Filter by settlement state (e.g., "FINALIZED"). |
limit | number | 50 | Maximum items per page. |
offset | number | 0 | Number of items to skip. |
Return Type
| Property | Type | Description |
|---|---|---|
settlements | Settlement[] | Array of settlements for the current page. |
total | number | Total number of matching settlements (for pagination). |
isLoading | boolean | true during fetch. |
error | string | null | Error message if the fetch failed. |
refetch | () => Promise<void> | Manually trigger a re-fetch. |
Behavior
- Fetches on mount and whenever options change.
- Re-fetches automatically when
state,limit, oroffsetchanges. - Returns settlements scoped to the platform and environment in the session token.