# Settle an action

Source: https://immiscible.fly.dev/docs/api/post-v1-actions-id-settle

`POST /v1/actions/:id/settle`

Report what actually happened after an allowed action, so the ledger holds the outcome and not only the permission. Settling above the authorised amount is recorded as an incident and alerts the owner. With the [card rail](https://immiscible.fly.dev/docs/guides/card-rail.md), the issuer's clearing settles card payments instead.

| Field | Type | Required | Description |
|---|---|---|---|
| `status` | string | yes | `completed`, `failed` or `cancelled` |
| `amount` | integer | for payments | the final amount in minor units |

## Authentication

Agent key. An agent-scoped key (`ask_...`) bound to exactly one agent, or an OAuth access token (`aat_...`) issued to an MCP client for that agent, sent as `Authorization: Bearer`. An agent key may ask, poll and settle. It can never approve, widen a mandate or lift a freeze.

## Path parameters

- `id` (string, required): Action id

## Request

curl:

```bash
curl -X POST "https://immiscible.fly.dev/v1/actions/act_7Qm2c1f0/settle" \
  -H "authorization: Bearer $IMMISCIBLE_AGENT_KEY" \
  -H "content-type: application/json" \
  -d '{
    "status": "completed",
    "amount": 4200
  }'
```

Node:

```ts
import { Immiscible } from '@immiscible/sdk';

// Reads IMMISCIBLE_AGENT_KEY and IMMISCIBLE_URL
const immiscible = new Immiscible();
const settled = await immiscible.settle('act_7Qm2c1f0', { status: 'completed', amount: 4200 });
console.log(settled.status);
```

Python:

```python
from immiscible import Immiscible

# Reads IMMISCIBLE_AGENT_KEY and IMMISCIBLE_URL
immiscible = Immiscible()
settled = immiscible.settle("act_7Qm2c1f0", status="completed", amount=4200)
print(settled.raw["status"])
```

## Response

```json
{
  "id": "act_7Qm2c1f0",
  "decision": "allow",
  "status": "completed",
  "reasons": [
    "within Weekly groceries: £42.00 of £150.00 per transaction"
  ],
  "mandateId": "mdt_91c3e0b2",
  "risk": {
    "score": 8,
    "signals": []
  },
  "settlement": {
    "status": "completed",
    "amount": 4200,
    "at": "2026-10-04T10:03:40Z",
    "incident": null
  },
  "incident": null
}
```
