create_order_refund
Create refunds for WooCommerce orders, full or partial, with automatic payment gateway processing or manual refunds.
Instructions
Create a refund for an order. Can refund full or partial amount. Set api_refund=true (default) to automatically refund via payment gateway, or false for manual refund.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "create_order_refund"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Refund amount (omit to refund full order total) | |
| fields | No | Comma-separated fields to return in response | |
| reason | No | Reason for the refund | |
| order_id | Yes | Order ID | |
| api_refund | No | Automatically refund via payment gateway (default: true) | |
| line_items | No | Specific line items to refund |