Menu
Create Order Refund
This API helps you to create a new order refund.
POST
/orders/{orderId}/refundsUse it in a workflow
- Add a step and choose the WooCommerce connector.
- Pick the Create Order Refund action (under Orders).
- Fill in the fields below, then reference the result from later steps as
{{createOrderRefund.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"id": 0,
"reason": "string",
"total": "string",
"date_created": "2025-01-01T00:00:00Z",
"date_created_gmt": "2025-01-01T00:00:00Z",
"amount": "string",
"api_refund": false,
"line_items": [
{
"id": 0,
"name": "string",
"product_id": 0,
"variation_id": 0,
"quantity": 0,
"tax_class": "string",
"subtotal": "string",
"subtotal_tax": "string",
"total": "string",
"total_tax": "string",
"taxes": [
{
"id": 0,
"total": "string",
"subtotal": "string"
}
],
"meta_data": [
{
"id": 0,
"key": "string",
"value": {},
"display_key": "string",
"display_value": {}
}
]
}
],
"refunded_by": 0,
"refunded_payment": false,
"meta_data": [
{
"id": 0,
"key": "string",
"value": {},
"display_key": "string",
"display_value": {}
}
]
}
Response
Returns 201 with an object. Read it in later steps with {{createOrderRefund.response.data.<field>}}.
{
"id": 0,
"reason": "string",
"total": "string",
"date_created": "2025-01-01T00:00:00Z",
"date_created_gmt": "2025-01-01T00:00:00Z",
"amount": "string",
"api_refund": false,
"line_items": [
{
"id": 0,
"name": "string",
"product_id": 0,
"variation_id": 0,
"quantity": 0,
"tax_class": "string",
"subtotal": "string",
"subtotal_tax": "string",
"total": "string",
"total_tax": "string",
"taxes": [
{
"id": 0,
"total": "string",
"subtotal": "string"
}
],
"meta_data": [
{
"id": 0,
"key": "string",
"value": {},
"display_key": "string",
"display_value": {}
}
]
}
],
"refunded_by": 0,
"refunded_payment": false,
"meta_data": [
{
"id": 0,
"key": "string",
"value": {},
"display_key": "string",
"display_value": {}
}
]
}
Need more? See the WooCommerce guide for connection setup and behaviour shared by every action.
Was this page helpful?