wc_create_order_refund
Creates a refund for a WooCommerce order. api_refund can request a payment-gateway refund and api_restock can change stock. Do not retry blindly after failure or a lost response; inspect the order and refunds first. Mirrors woocommerce-mcp-server method create_order_refund using local WordPress authentication; no WooCommerce REST API keys are required.
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": {
"site_id": "<site_id>",
"orderId": "<orderId>",
"refundData": "<refundData>"
},
"name": "wc_create_order_refund"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | The order ID. | |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| refundData | Yes | Refund fields to create. |