Skip to content

Getting error while initiating refund in test mode #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Gagan3130 opened this issue Apr 3, 2025 · 0 comments
Open

Getting error while initiating refund in test mode #438

Gagan3130 opened this issue Apr 3, 2025 · 0 comments

Comments

@Gagan3130
Copy link

Gagan3130 commented Apr 3, 2025

{
statusCode: 400,
error: {
code: 'BAD_REQUEST_ERROR',
description: 'invalid request sent',
metadata: {},
reason: 'NA',
source: 'NA',
step: 'NA'
}
}

This is the error I am getting. I have made sure the payment was captured for the paymentId also. I made 2 payment. One was made with card and other with upi and in both case I am getting the same error when trying to initiate the refund

const refund = await razorpay.payments.refund(paymentId, {
amount: refundAmount * 100,
notes: {
refundReason: "user cancelled the service",
},
receipt: "rec_1234",
});

this is refund initiation method i am using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant