Open mesky-tech opened 10 months ago
I don't think the 100 should be in quotes which makes it a string instead of an integer.
Try this client.payment.refund(,{"amount": 100,"speed": "optimum","receipt": "#Receipt No. 132"})
After spending a lot of time with the same error, I found out the implementation and docs have mismatch:
Docs:
Implementation:
Since amount is not mandatory (full refund case), it makes sense to change the implementation.
Yes, there is a mismatch in the docx and code. I already make a pull request containing the fix
you need to pass payment_id and amount as a positional argument not in the data dictionary client.payment.capture(payment_id, amount, {...})
in rest api its working fine but when i do call with client sdk getting this error everytime razorpay.errors.BadRequestError: The amount must be an integer.
client.payment.refund(,{"amount": "100","speed": "optimum","receipt": "#Receipt No. 132"})