Process a refund for a single order

WooCommerceIntermediate~10 min

Before you start

WooCommerce enabled, with the order read, refund, and note abilities turned on. The refund write ability stays off until you deliberately switch it on.

A refund is the one WooCommerce action you most want a careful hand on, because it moves real money and you cannot take it back. This recipe is built for exactly that: it reads the whole order first, puts the precise amount in front of you, and waits for a clear yes before it does anything. It handles one order at a time on purpose, so there is never a batch of refunds running past you.

The prompt
I need to refund an order. First, change nothing: read order [#1234] in full,
the line items, totals, and any refunds already on it, and show it to me.
Then propose the refund: the exact amount [or which line items] and a short
reason. Stop there and wait. Do not create the refund until I reply with an
explicit yes to that exact amount.
Once I approve it, create the refund for only that amount, add an order note
recording it, and draft a short message to the customer that I will send
myself. Do not email anyone. Then tell me the refund amount and id so I can
match it against my payment gateway.

Why this is safe to run

Read first, and the read is the whole point here. Pulling the order and its existing refunds writes nothing, so you see the real totals and confirm the exact amount before money moves. The recipe does one order at a time and stops dead until you reply with an explicit yes, so there is no batch and no default-approve.

Be clear on the limits, because a refund is not like the other writes. It is real money leaving your account and it is not reversible from here, so this is the recipe to slow down on. The agent also cannot email your customer: it drafts the message and logs a note on the order, and the actual send stays with you. Every refund is checked against the capability of the user you bound the agent to and recorded in the Activity Log with the order and amount, so you always have the receipt.

Already connected? Skip the paste. Ask your agent for the “process a refund for a single order” recipe, or just name the order, and it runs the same read-then-approve flow on your own store.

How it works

  1. Read the full order: line items, totals, and any refunds already on it.
  2. Show the exact refund amount and reason, and wait for your explicit approval.
  3. Create the refund for only the approved amount.
  4. Add an order note recording the refund, and draft a customer message for you to send yourself.
  5. Return what it did so you can confirm the amount against your gateway.

Questions

Can I undo a refund if it was wrong?
No. A refund moves real money back to the customer and it is not reversible from here. That is why the whole recipe is built around reading the order and getting your explicit approval on the exact amount before it runs.
Does it email the customer to tell them about the refund?
No. The agent cannot send email. It drafts a message for you and leaves a note on the order, and you send the message to the customer yourself through your normal channel.