# Approve refunds before they run

Source: https://docs.stacksona.com/playbooks/refund-approval
Markdown: https://docs.stacksona.com/playbooks/refund-approval.md

Use this pattern when an agent is about to issue a refund, credit, adjustment, or billing change that a person should review first.

Workflow Playbook


Use this pattern when an agent is about to issue a refund, credit, adjustment, or billing change that a person should review first.


## When to use this


Use this pattern when an agent is about to issue a refund, credit, adjustment, or billing change that a person should review first.


## Where Stacksona fits


Place Stacksona after the agent has prepared the refund request and before the payment, billing, or commerce API is called.


## What the reviewer should see

- amount
- currency
- customer
- order or invoice
- refund reason
- policy threshold
- prior refund history if available
- agent recommendation
- consequence of approval


## Minimum fields to send

- agent_id
- workflow_id
- tool_name: issue_refund
- action_type: refund
- amount
- currency
- customer_id
- order_id or invoice_id
- reason
- policy_threshold
- callback_url, if using async review


## Example request


```
{ "agent_id": "billing-agent-01", "workflow_id": "refund-review-flow", "tool_name": "issue_refund", "action_type": "refund", "amount": 500, "currency": "usd", "customer_id": "cus_99", "order_id": "ord_8821", "reason": "Carrier shows no movement after 14 days.", "policy_threshold": "manual_review_required_over_100_usd", "callback_url": "https://app.example.com/stacksona/refund-callback" }
```


## How to branch after the decision


| Status | Behavior |
| --- | --- |
| allowed or approved | Issue the refund. |
| pending_review | Pause, poll, or wait for callback. |
| rejected | Do not issue the refund. |
| expired or error | Fail closed and do not issue the refund. |


## What to log after execution

- decision_id
- refund_id
- payment provider id
- amount
- currency
- execution_status
- executed_at


## Common mistakes

- issuing the refund before validation
- omitting the amount or customer history from reviewer view
- not validating signed approval for high-impact refunds
- retrying after a rejected decision


## Related integrations
[Node and TypeScript](/integrations/node-typescript/index.html)[Custom REST](/integrations/custom-rest/index.html)[LangGraph](/integrations/langgraph/index.html)[n8n](/integrations/n8n/index.html)[Security](/reference/security/index.html)[Decision Statuses](/reference/decision-statuses/index.html)
