Skip to content

Commit 8421caa

Browse files
committed
Add line item parameters for "Create a refund"
Fixes woocommerce/woocommerce#45924
1 parent b392434 commit 8421caa

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

source/includes/wp-api-v3/_order-refunds.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ The order refunds API allows you to create, view, and delete individual refunds,
4747
| `meta_data` | array | Meta data. See [Order refund - Meta data properties](#order-refund-meta-data-properties) |
4848
| `sku` | string | Product SKU. <i class="label label-info">read-only</i> |
4949
| `price` | string | Product price. <i class="label label-info">read-only</i> |
50-
| `refund_total` | number | The amount to refund for this line item, excluding taxes. <i class="label label-info">write-only</i> |
5150

5251
#### Order refund line item - Taxes properties ####
5352

@@ -56,7 +55,6 @@ The order refunds API allows you to create, view, and delete individual refunds,
5655
| `id` | integer | Tax rate ID. <i class="label label-info">read-only</i> |
5756
| `total` | string | Tax total. <i class="label label-info">read-only</i> |
5857
| `subtotal` | string | Tax subtotal. <i class="label label-info">read-only</i> |
59-
| `refund_total` | number | The amount to refund for this tax. <i class="label label-info">write-only</i> |
6058

6159
### Order refund - Tax lines properties ###
6260

@@ -250,6 +248,21 @@ woocommerce.post("orders/723/refunds", data).parsed_response
250248
}
251249
```
252250

251+
#### Line item parameters ####
252+
253+
| Parameter | Type | Description |
254+
|----------------|---------|----------------------------------------------------------------------------|
255+
| `id` | integer | The ID of the line item in the order. |
256+
| `refund_total` | number | The amount to refund for this line item, excluding taxes. |
257+
| `refund_tax` | array | Refunds for tax rates. See [Refund tax parameters](#refund-tax-parameters) |
258+
259+
#### Refund tax parameters ####
260+
261+
| Parameter | Type | Description |
262+
|----------------|---------|----------------------------------------------------------------|
263+
| `id` | integer | The ID of the tax rate. |
264+
| `refund_total` | number | The amount of tax to refund for this line item. |
265+
253266
## Retrieve a refund ##
254267

255268
This API lets you retrieve and view a specific refund from an order.

0 commit comments

Comments
 (0)