Skip to content

Refund API throwing error #454

@hrawat0308

Description

@hrawat0308

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions