Skip to main content

Refunds

The refunds API is a simple, read-only endpoint that allows you to retrieve a list of refunds outside the context of an existing order. To create, view, and delete individual refunds, check out the order refunds API.

Refund properties​

All properties are the same as those in the order refunds endpoint, but with one additional property:

AttributeTypeDescription
parent_idintegerThe ID of the order the refund is associated with.

Retrieve a list of refunds​

This API lets you retrieve and view refunds from your store, regardless of which order they are associated with.

GET /wp-json/wc/v3/refunds
curl https://example.com/wp-json/wc/v3/refunds \
-u consumer_key:consumer_secret

Available parameters​

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Options: view and edit. Default is view.
pageintegerCurrent page of the collection. Default is 1.
per_pageintegerMaximum number of items to be returned in result set. Default is 10.
searchstringLimit results to those matching a string.
afterstringLimit response to resources published after a given ISO8601 compliant date.
beforestringLimit response to resources published before a given ISO8601 compliant date.
excludearrayEnsure result set excludes specific IDs.
includearrayLimit result set to specific ids.
offsetintegerOffset the result set by a specific number of items.
orderstringOrder sort attribute ascending or descending. Options: asc and desc. Default is desc.
orderbystringSort collection by object attribute. Options: date, modified, id, include, title and slug. Default is date.
parentarrayLimit result set to those of particular parent IDs.
parent_excludearrayLimit result set to all items except those of a particular parent ID.
dpintegerNumber of decimal points to use in each resource. Default is 2.