The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Refund
orders
, marketplace_orders
.The Refund resource has two major components:
- Transaction records of money returned to the customer
- The line items included in the refund, along with restocking instructions
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 of the calculate
endpoint 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.
Endpoints
- post/admin/api/latest/orders/{order_
id}/refunds. json Creates a refund - post/admin/api/latest/orders/{order_
id}/refunds/calculate. json Calculates a refund - get/admin/api/latest/orders/{order_
id}/refunds. json Retrieves a list of refunds for an order - get/admin/api/latest/orders/{order_
id}/refunds/{refund_ id}. json Retrieves a specific refund
The Refund resource
Properties
The date and time (<a href='https://en.wikipedia.org/wiki/ISO_8601'target="_blank">ISO 8601 format) when the refund was created.
A list of duties that have been reimbursed as part of the refund.
The unique identifier for the refund.
An optional note attached to a refund.
A list of order adjustments attached to the refund. Order adjustments are generated to account for refunded shipping costs and differences between calculated and actual refund amounts. As of the 2024-10 Admin API version, refunded shipping costs are no longer considered order adjustments and should be accessed through refund_shipping_lines
. Each entry has the following properties:
Show order_adjustments properties
- id: The unique identifier for the order adjustment.
- order_id: The unique identifier for the order that the order adjustment is associated with.
- refund_id: The unique identifier for the refund that the order adjustment is associated with.
- amount: This field is deprecated, please use
amount_set
. The value of the discrepancy between the calculated refund and the actual refund. If thekind
property's value isshipping_refund
, thenamount
returns the value of shipping charges refunded to the customer. - tax_amount: This field is deprecated, please use
tax_amount_set
. The taxes that are added toamount
, such as applicable shipping taxes added to a shipping refund. - kind: This field is deprecated as of the 2024-10 Admin API and will not be supported in the future. The order adjustment type. Valid values:
shipping_refund
andrefund_discrepancy
. - reason: The reason for the order adjustment. To set this value, include
discrepancy_reason
when you create a refund. - amount_set: The amount of the order adjustment in shop and presentment currencies.
- tax_amount_set: The tax amount of the order adjustment in shop and presentment currencies.
The date and time (ISO 8601 format) when the refund was imported. This value can be set to a date in the past when importing from other systems. If no value is provided, then it will be auto-generated as the current time in Shopify. Public apps need to be granted permission by Shopify to import orders with the processed_at
timestamp set to a value earlier the created_at
timestamp. Private apps can't be granted permission by Shopify.
A list of refunded duties. Each entry has the following properties:
Show refund_duties properties
- duty_id: The unique identifier of the duty.
- refund_type: Specifies how you want the duty refunded. Valid values:
FULL
: Refunds all the duties associated with a duty ID. You do not need to include refund line items if you are using the full refund type.PROPORTIONAL
: Refunds duties in proportion to the line item quantity that you want to refund. If you choose the proportional refund type, then you must also pass the refund line items to calculate the portion of duties to refund.
A list of refunded line items. Each entry has the following properties:
Show refund_line_items properties
- id: The unique identifier of the line item in the refund.
- line_item: A line item being refunded.
- line_item_id: The ID of the related line item in the order.
- quantity: The refunded quantity of the associated line item.
- restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be refunded or made available for sale again.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered, and will be returned to the merchant. The refunded quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock: The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
- location_id: The unique identifier of the location where the items will be restocked. Required when
restock_type
has the valuereturn
orcancel
. - subtotal: The subtotal of the refund line item.
- total_tax: The total tax on the refund line item.
- subtotal_set: The subtotal of the refund line item in shop and presentment currencies.
- total_tax_set: The total tax of the line item in shop and presentment currencies.
A list of refunded shipping lines. Each entry has the following properties:
Show refund_shipping_lines properties
- id: The unique identifier of the shipping line in the refund.
- shipping_line: The shipping line being refunded.
- shipping_line_id: The ID of the related shipping line in the order.
- subtotal_amount_set: The subtotal of the refund shipping line in shop and presentment currencies.
Whether to add any of the line items back to the store's inventory. Use restock_type
for refund line items instead.
A list of transactions involved in the refund. A single order can have multiple transactions associated with it. For more information, see the Transaction resource.
The unique identifier of the user who performed the refund.
The Refund resource
Anchor to POST request, Creates a refundpostCreates a refund
For multi-currency orders, the currency
property is required whenever the amount
property is provided.
Creates a refund. Use the calculate
endpoint to produce the transactions to submit.
When you use this endpoint with a Partner development store or a trial store, you can create only five refunds per minute.
Anchor to Parameters of Creates a refundParameters
The three-letter code (ISO 4217 format) for the currency used for the refund.
An optional comment that explains a discrepancy between calculated and actual refund amounts. Used to populate the reason
property of the resulting order_adjustment
object attached to the refund. Valid values: restock
, damage
, customer
, and other
.
An optional note attached to a refund.
Whether to send a refund notification to the customer.
A list of line item IDs, quantities to refund, and restock instructions. Each entry has the following properties:
Show refund_line_items properties
line_item_id: The ID of a line item to refund.
quantity: The quantity to refund.
restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered but will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
location_id: The ID of the location where the items should be restocked. This is required when the value of
restock_type
isreturn
orcancel
. If the item is not already stocked at the location, then the item is connected to the location. An error is returned when the item is connected to a fulfillment service location and a different location is provided.
Whether to add the line items back to the store inventory. Use restock_type
for refund line items instead.
Specify how much shipping to refund. It has the following properties:
Show shipping properties
full_refund: Whether to refund all remaining shipping.
amount: Set a specific amount to refund for shipping. Takes precedence over
full_refund
.
A list of transactions
to process as refunds. Use the calculate
endpoint to obtain these transactions.
Create a refund for an order
Create a refund for an order
Show refund properties
An optional note attached to a refund.
A list of refunded line items. Each entry has the following properties:
Show refund_line_items properties
- id: The unique identifier of the line item in the refund.
- line_item: A line item being refunded.
- line_item_id: The ID of the related line item in the order.
- quantity: The refunded quantity of the associated line item.
- restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be refunded or made available for sale again.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered, and will be returned to the merchant. The refunded quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock: The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
- location_id: The unique identifier of the location where the items will be restocked. Required when
restock_type
has the valuereturn
orcancel
. - subtotal: The subtotal of the refund line item.
- total_tax: The total tax on the refund line item.
- subtotal_set: The subtotal of the refund line item in shop and presentment currencies.
- total_tax_set: The total tax of the line item in shop and presentment currencies.
A list of transactions involved in the refund. A single order can have multiple transactions associated with it. For more information, see the Transaction resource.
Refund a specific amount of shipping
Refund a specific amount of shipping
Show refund properties
A list of transactions involved in the refund. A single order can have multiple transactions associated with it. For more information, see the Transaction resource.
/admin/api/2025-07/orders/450789469/refunds. json
Response
Anchor to POST request, Calculates a refundpostCalculates a refund
For multi-currency orders, the currency
property is required whenever the amount
property is provided.
Calculates refund transactions based on line items and shipping. When you want to create a refund,
you should first 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 intend to refund
shipping costs. If the restock instructions can't be met—for example, because you try to return more items than have been
fulfilled—then the endpoint returns modified restock instructions. You can then use the response in the body of the request to create the actual refund.
The response includes a transactions
object with "kind": "suggested_refund"
,
which must to be changed to "kind" : "refund"
for the refund to be accepted.
The three-letter code (ISO 4217 format) for the
currency used for the refund. Note: Required whenever the shipping amount
property is provided.
A list of line item IDs, quantities to refund, and restock instructions. Each entry has the following properties:
Show refund_line_items properties
line_item_id: The ID of a line item to refund.
quantity: The quantity to refund.
restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered but will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
location_id: The ID of the location where the items should be restocked. If
location_id
is not provided and the value ofrestock_type
isreturn
orcancel
, then the endpoint returns a suitable location ID.already_stocked: Whether the item is already stocked at the location. If this is
false
, then creating the refund will connect the item to the location and start stocking it there.
Specify how much shipping to refund. It has the following properties:
Show shipping properties
full_refund: Whether to refund all remaining shipping.
amount: Set a specific amount to refund for shipping. Takes precedence over
full_refund
.
Calculate a refund for a partial amount of shipping
Calculate a refund for a partial amount of shipping
Calculate the refund for a line item and shipping
Calculate the refund for a line item and shipping
Show refund properties
A list of refunded line items. Each entry has the following properties:
Show refund_line_items properties
- id: The unique identifier of the line item in the refund.
- line_item: A line item being refunded.
- line_item_id: The ID of the related line item in the order.
- quantity: The refunded quantity of the associated line item.
- restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be refunded or made available for sale again.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered, and will be returned to the merchant. The refunded quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock: The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
- location_id: The unique identifier of the location where the items will be restocked. Required when
restock_type
has the valuereturn
orcancel
. - subtotal: The subtotal of the refund line item.
- total_tax: The total tax on the refund line item.
- subtotal_set: The subtotal of the refund line item in shop and presentment currencies.
- total_tax_set: The total tax of the line item in shop and presentment currencies.
Calculate the refund without specifying currency
Calculate the refund without specifying currency
Show refund properties
A list of refunded line items. Each entry has the following properties:
Show refund_line_items properties
- id: The unique identifier of the line item in the refund.
- line_item: A line item being refunded.
- line_item_id: The ID of the related line item in the order.
- quantity: The refunded quantity of the associated line item.
- restock_type: How this refund line item affects inventory levels. Valid values:
- no_restock: Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be refunded or made available for sale again.
- cancel: The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return: The items were already delivered, and will be returned to the merchant. The refunded quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock: The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
- location_id: The unique identifier of the location where the items will be restocked. Required when
restock_type
has the valuereturn
orcancel
. - subtotal: The subtotal of the refund line item.
- total_tax: The total tax on the refund line item.
- subtotal_set: The subtotal of the refund line item in shop and presentment currencies.
- total_tax_set: The total tax of the line item in shop and presentment currencies.
/admin/api/2025-07/orders/450789469/refunds/calculate. json
Response
Anchor to GET request, Retrieves a list of refunds for an ordergetRetrieves a list of refunds for an order
Retrieves a list of refunds for an order. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
Show only certain fields, specified by a comma-separated list of field names.
Show amounts in the shop currency for the underlying transaction.
The maximum number of results to retrieve.
Retrieve all refunds from a specific order
Retrieve all refunds from a specific order
/admin/api/2025-07/orders/450789469/refunds. json
Response
Anchor to GET request, Retrieves a specific refundgetRetrieves a specific refund
Retrieves a specific refund.
Show only certain fields, specified by a comma-separated list of field names.
Show amounts in the shop currency for the underlying transaction.
Retrieve a specific refund
Retrieve a specific refund