razorpay / razorpay-php

Razorpay PHP Library
MIT License
186 stars 128 forks source link

BAD_REQUEST_ERROR While closing the Virtual account #232

Closed tejesh002 closed 2 years ago

tejesh002 commented 3 years ago

$api = new \Razorpay\Api\Api('keyid','key_secret'); $order = $api->virtualAccount->fetch('referenceid); $order->close();

I'm getting this error

Type: Razorpay\Api\Errors\BadRequestError Code: BAD_REQUEST_ERROR Message: status is/are not required and should not be sent File: /vendor/razorpay/razorpay/src/Request.php Line: 142

ankitdas13 commented 2 years ago

@tejesh002 can you please use this code snippet for close virtual account

$api->virtualAccount->fetch($virtualId)->close();

or you can use this documentation for virtual account releated api