Small refund
executedLow-risk refund on a paid order. Auto-execute, audit, done.
curl https://api.kiff.dev/v1/entities/ord_001/actions/AUTO_REFUND/execute \
-H 'authorization: Bearer kiff_live_<tenant>_<random>' \
-H 'content-type: application/json' \
-d '{
"entity_type": "order",
"actor": {"id": "ops-agent", "type": "agent", "roles": ["operator"]},
"parameters": {"amount": 49.0, "reason": "customer request"}
}'{
"result": {
"action_name": "AUTO_REFUND",
"entity_id": "ord_001",
"status": "succeeded",
"executed": true,
"message": "auto-refund of $49.00 issued"
}
}Audit trail · 7 records
| time | kind | actor | summary |
|---|---|---|---|
| 09:41:02.123 | event_ingested | stripe | ORDER_PLACED |
| 09:41:02.124 | state_changed | stripe | CREATED → PAID |
| 09:42:11.001 | decision_recorded | ops-agent | propose AUTO_REFUND |
| 09:42:11.002 | action_validated | ops-agent | AUTO_REFUND ✓ |
| 09:42:11.005 | action_executed | ops-agent | AUTO_REFUND |
| 09:42:11.006 | event_ingested | ops-agent | ORDER_REFUNDED |
| 09:42:11.007 | state_changed | ops-agent | PAID → REFUNDED |
rebuild: materialized state matches replay ✓
Order is PAID. Amount is below the auto-execute threshold. AUTO_REFUND requires no approval. KIFF runs it.