Skip to main content
The refunds endpoints let you refund captured payments, retrieve individual refunds, list historical refunds, and update refund notes.

Refund payment

POST /api/auth/razorpay/payment/refund Refunds a captured Razorpay payment. You can refund the full amount or a partial amount. Server API name: refundRazorpayPayment
Client method: authClient.razorpay.payment.refund(...)
string
required
Razorpay payment id to refund.
integer
Amount to refund in subunits. Omit to refund the full payment amount.
string
Refund speed. One of normal or optimum.
string
Your internal receipt identifier for this refund.
object
Up to 15 key-value pairs. Each value must be 256 characters or fewer.
Errors: REFUND_NOT_FOUND, REFUND_FETCH_FAILED, REFUND_EDIT_FAILED.

Get refund

GET /api/auth/razorpay/refund/get Retrieves a single refund by id. Server API name: fetchRefund
Client method: authClient.razorpay.refund.get({ query: { refundId, paymentId? } })
string
required
Razorpay refund id, for example rfnd_XXXX.
string
Optional Razorpay payment id for additional context.
Errors: REFUND_FETCH_FAILED.

List refunds

GET /api/auth/razorpay/refund/list Lists refunds with pagination. Server API name: fetchAllRefunds
Client method: authClient.razorpay.refund.list({ query: { ... } })
integer
Unix timestamp. Return refunds created after this time.
integer
Unix timestamp. Return refunds created before this time.
integer
Maximum number of refunds to return. Maximum value is 100.
integer
Number of refunds to skip.
Errors: REFUND_LIST_FAILED.

Edit refund

POST /api/auth/razorpay/refund/edit Updates the notes on an existing refund. Server API name: editRefund
Client method: authClient.razorpay.refund.edit(...)
string
required
Razorpay refund id to update.
object
New notes object. Up to 15 key-value pairs, values 256 characters or fewer.
Errors: REFUND_EDIT_FAILED.