Version 2019-10


Apps are required to specify a restock_type and a location_id on the refund_line_item. For more information, see Migrating to multi-location inventory.

There are two major parts to a refund:

Before you create a refund, use the calculate endpoint to generate accurate refund transactions. Specify the line items that are being refunded, their quantity and restock instructions, and whether you're refunding shipping costs. You can then use the response in the body of the request to create the actual refund.

When you create a refund using the response from the calculate endpoint, you can set additional options, such as whether to notify the customer of the refund. You can refund less than the calculated amount for either shipping or the line items by setting a custom value for the amount property.

If a refund includes shipping costs, or if you choose to refund line items for less than their calculated amount, then an order adjustment is created automatically to account for the discrepancy in the store's financial reports.

What you can do with Refund

The Shopify API lets you do the following with the Refund resource. More detailed versions of these general actions may be available:

Refund properties

"created_at": "2008-01-10T11:00:00-05:00"

The date and time (ISO 8601 format) when the refund was created.

"id": 92738740

The unique identifier for the refund.

"note": "Item was damaged during shipping"

An optional note attached to a refund.

"order_adjustments": [
    "id": 4221763620,
    "order_id": 171016912932,
    "refund_id": 8244756516,
    "amount": "-8.00",
    "tax_amount": "0.00",
    "kind": "shipping_refund",