I am using razorpay for payments and also i decided to use razorpay API to refund amount, but when i tried to use the refund API on test mode it doesnt work it throws error like Your account does not have enough balance to carry out the refund operation. You can add funds to your account from your Razorpay dashboard or capture new payments. iam using razorpay test mode and there is no option to add balance also we can only add balance in live mode. how can use refund API and test it in test mode
API i used:
https://api.razorpay.com/v1/payments/{Given payment Id}/refund
error message i got is:
"error": { "code": "BAD_REQUEST_ERROR", "description": "Your account does not have enough balance to carry out the refund operation. You can add funds to your account from your Razorpay dashboard or capture new payments.", "source": "NA", "step": "NA", "reason": "NA", "metadata": {} }
i have given correct access and secret keys that i used for payments. and i used the paymentaId of a captured payment only. how to implement razorpay refund API and test it in test mode ?
Feel free to make a few more dummy payments in the test environment! Each transaction made will eventually increase the balance, allowing you to refund the transactions later on.