razorpay / razorpay/razorpay-node
Refund API throwing error
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 243
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce the behavior
await razorpay.payments.refund(payment_id, {
amount: 150000,
speed: "normal",
notes: {
appointment_id,
user_fhir_id,
reason
}
});
Error I am getting is :
{
statusCode: 400,
error: {
code: 'BAD_REQUEST_ERROR',
description: 'invalid request sent',
metadata: {},
reason: 'NA',
source: 'NA',
step: 'NA'
} }
Expected behavior
- This API should execute the refund , without throwing any error
Actual behavior
- Throwing error
Code snippets
Node version
v22.14.0
Library version
^2.9.6
Additional Information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the payments.refund entry point and reproduce the request using Node v22.14.0 and library version ^2.9.6. Check the refund API requirements for payment_id, amount, speed, and notes; done when the same request executes without the reported 400 BAD_REQUEST_ERROR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend, payments
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100