Find Shopify orders by discount code: who used a code
The question arrives in different clothes. An influencer wants to know how many sales her code brought in before she posts again. A customer writes that WELCOME10 says it has already been used and swears it has not. Finance wants every order that took the staff discount in October. The answer to all three is the same list: the orders where one particular discount code was applied.
Shopify can produce that list in a second. The trick is knowing the search term, because the filter menu on the Orders page is long and the code filter is not near the top. This post covers the search itself, the chip that Shopify Admin Power-Up adds so you do not have to remember it, and the cases where the list will not tell you what you hoped.
The search term
Type this into the search box on the Orders page, with your own code after the colon:
discount_code:WELCOME10
The list reloads with the orders that used that code. It is ordinary Shopify search syntax, the same family as sku: and tag:, and the result behaves like any other order list. You can sort it, select rows, export it, or save it as a view with a name like "Influencer codes".
If the code contains a space or punctuation, wrap it in double quotes: discount_code:"VIP 2026". Without the quotes the search splits at the space and you get orders that match something else entirely.
The chip that types it for you
With quick filters switched on in the extension, the Orders page gets a row of chips under the search box: SKU, Customer, Discount code, Tag, Unfulfilled and Unpaid. Click Discount code, type the code into the small field that opens, press Enter. The extension writes discount_code: plus your text into the admin's own search and adds the quotes when the code needs them.
That is all it does. It does not read your orders or ask a server anything. It builds the same URL you would get by typing, so a colleague without the extension can open a link you send them and see the same list.
Two habits make the chip more useful:
- A chip replaces the search. Whatever was in the box before is gone. To narrow the result, click the chip first and type the extra term afterwards, for example
discount_code:WELCOME10 fulfillment_status:unfulfilledto see which coded orders still need packing. - Raise the page size first. A code that went out in a newsletter can match hundreds of orders. At Shopify's 50 rows that is page after page. With rows per page set to 250 most campaigns fit on one screen, and the Export dialog's Current page option covers the lot.
Three jobs the list does well
Paying an affiliate or influencer
Search the code, set the date range filter to the campaign dates, and export. The CSV has one row per line item with the order total, the discount amount and the discount code column, which is what an affiliate statement needs. Cancelled and refunded orders are in the list too, with their status shown, so you can take them out before you calculate commission. A report total will not show you which orders those were.
"It says the code has already been used"
Shopify's discount FAQ describes this one. A code limited to one use per customer is held against the limit when the customer submits the order, and released if the payment fails. If the checkout never finishes, the hold can stay. Shopify's advice is to go to Orders and check whether the customer has an order with the code. So search the code, then add the customer's email after it: discount_code:WELCOME10 email:ana@example.com. One order means the message is right. No order means a stuck checkout is holding the code, and the FAQ's fix is a fresh code with the same conditions, because renaming or reactivating the old one does not reset its history.
Checking a code before you switch it off
Before you delete or expire a code, look at who used it last and when. A code nobody has touched since spring is safe to retire. A code with three orders this week is printed on something that is still out there, a flyer in a parcel or a post that keeps getting shared.
What the search does not find
| Situation | Found by discount_code: | Where to look instead |
|---|---|---|
| Customer typed a code at checkout | Yes | |
| Automatic discount, no code entered | No, there is no code on the order | Sales by discount report, by discount name |
| Sale price set with compare-at price | No, that is a price, not a discount | Product or variant sales reports |
| Custom discount typed into a draft order | No, unless a code was applied to the draft | Open the order and read the discount line |
| Two codes on one order | Yes, under either code |
The automatic discount row catches people most often. A Black Friday automatic discount called BF30 looks like a code in the Discounts list, but shoppers never typed it, and an order search for it comes back empty or nearly so. The Black Friday weekend post has more on working the Orders page during a sale. If you need per-order lists for a campaign, a code is the easier thing to trace afterwards.
Spelling matters as well. Search the code exactly as it is written on the discount. A shortened or misspelled version will not match by accident. If you run a family of codes such as ANA10, ANA15 and ANA20, search each one, or tag the orders as they come in and use the Tag chip.
List or report?
Shopify points to the Sales by discount report for the question "which codes are used the most", and for that question it is the right tool. It gives one row per discount with the number of orders and the amounts, across every code at once. Use it to compare codes.
The report stops at totals. It will not show which customer, whether the parcel shipped, or whether the order was refunded a week later. For anything that ends in an action on specific orders, the order list is what you need. In practice you use both: the report to see that ANA10 brought in 41 orders, then the chip to open those 41.
Without leaving the keyboard
If keyboard shortcuts are on, g o jumps to Orders from anywhere in the admin and / puts the cursor in the search box, where you can type discount_code: yourself. g x opens Discounts when you need to check the exact spelling of a code first. The post on the other order chips covers SKU, tag and customer lookups, which combine with a code search in the same way.
If the chip row is missing, check that Quick filter chips is switched on in the extension's popup and that you are on the Orders list itself, not inside a single order.