The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
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.
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:
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 shipping lines. Each entry has the following properties:
restock_type
for refund line items instead.Creates a refund. Use the calculate
endpoint to produce the transactions to submit.
The three-letter code (ISO 4217 format) for the currency used for the refund.
reason
property of the resulting order_adjustment
object attached to the refund. Valid values: restock
, damage
, customer
, and other
.restock_type
for refund line items instead.calculate
endpoint to obtain these transactions.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.