Razorpay · Refund a payment — Sends money back for a payment — all of it, or part — refunds a captured payment through your Razorpay account. It is marked Moves money: with a live key, the customer really gets the money back. See Steps that move money.

Who can do this

Workspace Admins and Editors, on every plan. Viewers see the step's settings but cannot change them.

Before you start

  • A Razorpay connection — see Connect Razorpay. Use one with a test key while you build.
  • The payment's id, starting pay_ — from a trigger such as Payment captured, or from Fetch a payment.

Steps

  1. Select + where the refund should be made. In the step picker, open Apps, select Razorpay, then Refund a payment. The settings open with Moves money and This step sends money out of your account.
  2. In Connection, choose your Razorpay connection. Read the line under it: Live key — real money. or Test mode — Test key — no real money moves.
  3. In Payment, the payment to refund — The payment to refund — from a trigger or an earlier step. For example {{ trigger.id }}.
  4. In Refund, choose:
    • Full — the default. Razorpay refunds what is left of the payment.
    • Part — then fill in Amount — In rupees; Bizomate sends paise. For example 500.00.
  5. In Currency, the payment's currency — ₹ Indian rupee by default.
  6. Leave Idempotency key as {{ run.id }} — A retry of this step sends the same key, so the service pays once. Run again, Test run and Run this step start a new run with a new key, and pay again. Bizomate adds the step's id, and the item's position, to it.
  7. Optional: under Notes, select Add a field and add a name and value — reason and Damaged in transit.
  8. Select Test run. With a live key, Bizomate asks first — This workflow refunds ₹ 500.00 with a live Razorpay key. A test run pays for real. — with Refund ₹ 500.00 and Cancel. For a full refund it reads This workflow refunds a payment in full with a live Razorpay key. A test run pays for real., with Refund for real.

Output

Field What it is
id Razorpay's id for the refund — starts rfnd_.
paymentId The payment it refunds.
status pending or processed.
amount, amountMain, amountText 50000 (paise), 500, ₹ 500.00.
currency INR.
receipt The idempotency key the refund was made with.
alreadyRefunded false for a new refund; true when a refund with this key already existed and was given back instead.

What happens next

  • Razorpay sends the money back to the customer's card, account or UPI. It can take several working days to reach them; the trigger Refund processed tells you when it has — see Start a workflow from Razorpay payment events.
  • Before refunding, Bizomate looks at the payment's refunds for one whose receipt is this step's key. If it finds one, it gives that back with alreadyRefunded: true, and nothing more is refunded.

Good to know

  • A retried step refunds once. With the step set to try again when it fails, every try in the same run uses the same key. See Make a step try again when it fails.
  • Run again refunds again. It is a new run, with a new key. So are Test run and Run this step.
  • Once per order. To refund an order only once, whichever run does it, set Idempotency key to a value from the trigger, such as {{ trigger.orderId }}.
  • Runs once per item. Each item refunds its own payment.
  • A long key — over 40 characters with the step's id added — is shortened to 40, as Razorpay's receipt allows no more.

If something goes wrong

What you see Why What to do
Payment is empty when the step ran — an earlier step may not have given the value it names. Payment reads a value that came out empty. Check the value it reads.
Amount is empty when the step ran — … Refund is Part and Amount is empty. Fill in Amount, or choose Full.
Razorpay refused: … Razorpay would not refund, in its own words — the payment is not captured, is already fully refunded, or the amount is more than is left. Fetch the payment and check status and amount_refunded.
alreadyRefunded is true and you meant a new refund The key was used before. Use a different Idempotency key.
Razorpay refused: Authentication failed. Check the connection's details on Connections. The key was regenerated in Razorpay. Reconnect the connection with the new key.