How to bulk refund Shopify orders by line item
Refund specific line items on existing orders in bulk using a spreadsheet import.
Goal: Refund one or more line items on existing Shopify orders in bulk, return the payment for those items, and control restock behavior and customer notifications.
Prerequisites:
You have Altera installed on your Shopify store
The orders you want to refund already exist in your store
You know the order names (e.g., #1001) or IDs of the orders to refund
Step 1 - Export your orders
Export the orders you want to refund so you have the correct order names and line item details. Go to Apps > Altera > Export and select Orders. Use filters to narrow down to the specific orders.
Step 2 - Prepare your refund spreadsheet
Create a spreadsheet with the following columns. Each refund line item gets its own row.
Name | Command | Line: Type | Line: Variant SKU | Line: Quantity | Refund: ID | Refund: Restock | Refund: Restock Type | Refund: Note |
#1001 | UPDATE | Refund Line | SKU-001 | 1 | 1 | TRUE | return | Customer return |
#1001 | UPDATE | Refund Line | SKU-002 | 2 | 1 | TRUE | return | Customer return |
#1002 | UPDATE | Refund Line | SKU-003 | 1 | 1 | FALSE | Damaged item |
Key columns:
Name is the order number shown in your Shopify admin. You can also use the ID column with the numeric Shopify order ID.
Command must be
UPDATEto modify an existing order.Line: Type must be
Refund Lineso the row is treated as a refund.Line: Variant SKU tells the app which product to refund. You can also use Line: Variant ID if you have the Shopify variant ID.
Line: Quantity is how many units to refund. Use a positive number.
Refund: ID ties multiple rows into one refund. Give every row that should be part of the same refund the same number (e.g.,
1). Use a different number to create a separate refund on the same order.Refund: Restock set to
TRUEto add units back to inventory,FALSEto leave inventory unchanged.Refund: Restock Type use
returnfor items that were already shipped, orcancelfor items that were never fulfilled.
Step 3 - Decide how the payment is refunded
By default, the app returns the payment for the refunded items. For each refund it creates a refund transaction for the value of the refunded lines (one for each original payment on the order) (the unit price times the refunded quantity, plus the tax on those units), using the gateway of the original payment. You don't need to add any columns for this. The import result shows an informational message for each refund whose transaction was generated this way.
To record the refund without returning any money, for example when you already refunded the customer outside Shopify, add a Refund: Generate Transaction column and set it to FALSE. The line items are still marked as refunded and restocked as requested, but the order's payment status doesn't change.
Name | Command | Line: Type | Line: Variant SKU | Line: Quantity | Refund: ID | Refund: Restock | Refund: Generate Transaction |
#1003 | UPDATE | Refund Line | SKU-004 | 1 | 1 | TRUE | FALSE |
To refund a different amount than the value of the refunded lines, add a Transaction row with the same Refund: ID instead. Set Line: Type to Transaction, Transaction: Kind to refund, and Transaction: Amount to the amount to refund. When a refund has its own Transaction row, the app uses that transaction and doesn't generate one. See How to bulk partially refund Shopify orders for a specific amount for the amount-based format.
Step 4 - Add optional columns
You can include these additional columns:
Refund: Note to record why the refund was issued.
Refund: Send Receipt set to
TRUEif you want the customer to receive an email about the refund.Refund: Restock Location to choose which inventory location the returned units go to.
Step 5 - Import the file
Go to Apps > Altera > Import, upload your file, and confirm the import. The sheet name or file name should contain "Orders".
Outcome
Each order listed in the file is partially refunded for the specified line items, and the value of those items is returned to the customer unless you set Refund: Generate Transaction to FALSE. You can verify the refunds in the Shopify admin under Orders by opening each order and checking the refund history. The order timeline shows the refunded items and the refunded amount, and the order's payment status changes to partially refunded or refunded.
If an order has no payment to refund against, for example an order that was imported as unpaid, the refund is created without a transaction and the import result shows a warning for that order.
Example
To refund 1 unit of SKU-001 and 2 units of SKU-002 from order #1001 with restocking:
Name | Command | Line: Type | Line: Variant SKU | Line: Quantity | Refund: ID | Refund: Restock | Refund: Restock Type |
#1001 | UPDATE | Refund Line | SKU-001 | 1 | 1 | TRUE | return |
#1001 | UPDATE | Refund Line | SKU-002 | 2 | 1 | TRUE | return |
Because both rows have Refund: ID set to 1, they are processed together as a single refund on that order, with a refund transaction for the value of the three refunded units plus their tax.
