1
Issue a refund
Call the refund endpoint with the payment ID. Omit From the client:
amount for a full refund, or pass a smaller amount for a partial refund.server.ts
2
Fetch and list refunds
Use the refund endpoints to retrieve a single refund or list refunds with pagination.On the server:
3
Edit a refund
You can update the notes on an existing refund.Server alternative:
4
Handle refund webhooks
Configure the plugin callbacks to react when Razorpay notifies you about refund state changes.
auth.ts
React hooks for refunds
If you use TanStack Query in your React app, the plugin provides query and mutation hooks for refunds.List refunds
refunds-list.tsx
Edit a refund
edit-refund.tsx