You ask the customer for the last four digits or the invoice number before you touch the charge.
You tell the customer you will look at the charge. You check the last invoice before you promise anything.
The reply can use {{first_name}} and {{agent_first_name}}.
The customer hears that you will look. You see a note that says to check the invoice first. The founder gets the assignment because refunds should not be a round-robin decision.
Nothing in the snippet moves money. You still refund from Stripe, Paddle, or whichever provider you connected.