refund
Requires access scope or access scope.
Retrieves a refund by its ID. A refund represents a financial record of money returned to a customer from an order. It provides a comprehensive view of all refunded amounts, transactions, and restocking instructions associated with returning products or correcting order issues.
Use the refund query to retrieve information associated with the following workflows:
- Displaying refund details in order management interfaces
- Building customer service tools for reviewing refund history
- Creating reports on refunded amounts and reasons
- Auditing refund transactions and payment gateway records
- Tracking inventory impacts from refunded items
A refund is associated with an order and includes refund line items that specify which items were refunded. Each refund processes through order transactions that handle the actual money transfer back to the customer.
Arguments
- id (ID!)
- •ID!required
The ID of the Refund to return.
Anchor to Possible returnsPossible returns
- Refund (Refund)
- Anchor to RefundRefund•Refund
The
Refundobject represents a financial record of money returned to a customer from an order. It provides a comprehensive view of all refunded amounts, transactions, and restocking instructions associated with returning products or correcting order issues.The
Refundobject provides information to:- Process customer returns and issue payments back to customers
- Handle partial or full refunds for line items with optional inventory restocking
- Refund shipping costs, duties, and additional fees
- Issue store credit refunds as an alternative to original payment method returns
- Track and reconcile all financial transactions related to refunds
Each
Refundobject maintains detailed records of what was refunded, how much was refunded, which payment transactions were involved, and any inventory restocking that occurred. The refund can include multiple components such as product line items, shipping charges, taxes, duties, and additional fees, all calculated with proper currency handling for international orders.Refunds are always associated with an order and can optionally be linked to a return if the refund was initiated through the returns process. The refund tracks both the presentment currency (what the customer sees) and the shop currency for accurate financial reporting.
NoteThe existence of a
Refundobject doesn't guarantee that the money has been returned to the customer. The actual financial processing happens through associatedobjects, which can be in various states, such as pending, processing, success, or failure. To determine if money has actually been refunded, check the status of the associated transactions.Note:The existence of a
Refundobject doesn't guarantee that the money has been returned to the customer. The actual financial processing happens through associatedobjects, which can be in various states, such as pending, processing, success, or failure. To determine if money has actually been refunded, check the status of the associated transactions.Note: The existence of a <code>Refund</code> object doesn't guarantee that the money has been returned to the customer. The actual financial processing happens through associated <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction"><code><span class="PreventFireFoxApplyingGapToWBR">Order<wbr/>Transaction</span></code></a> objects, which can be in various states, such as pending, processing, success, or failure. To determine if money has actually been refunded, check the <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.status">status</a> of the associated transactions.
Learn more about managing returns, refunding duties, and processing refunds.
- Anchor to createdAtcreated•Date
At Time The date and time when the refund was created.
- Anchor to dutiesduties•[Refund
Duty!] A list of the refunded duties as part of this refund.
- •ID!non-null
A globally-unique ID.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to notenote•String
The optional note associated with the refund.
- Anchor to orderorder•Order!non-null
The order associated with the refund.
- Anchor to orderAdjustmentsorder•Order
Adjustments Adjustment Connection! non-null The order adjustments that are attached with the refund.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to processedAtprocessed•Date
At Time! non-null The date and time when the refund was processed.
- Anchor to refundLineItemsrefund•Refund
Line Items Line Item Connection! non-null The
resources attached to the refund.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to refundShippingLinesrefund•Refund
Shipping Lines Shipping Line Connection! non-null The
resources attached to the refund.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to returnreturn•Return
The return associated with the refund.
- Anchor to staffMemberstaff•Staff
Member Member The staff member who created the refund.
- Anchor to totalRefundedSettotal•Money
Refunded Set Bag! non-null The total amount across all transactions for the refund, in shop and presentment currencies.
- Anchor to transactionstransactions•Order
Transaction Connection! non-null The transactions associated with the refund.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the refund was updated.
- Anchor to totalRefundedtotal•Money
Refunded V2! non-nullDeprecated