Build error: in razorpay integration

node_modules\capacitor-razorpay\android\src\main\java\com\ionicframework\capacitor\ error: incompatible types: JSObject cannot be converted to Exception
lastSavedCall.reject(paymentData.getData().getJSONObject(“error”).toString(),paymentData.getData().getJSONObject(“error”).toString(), new JSObject());

i am using capacitor 3.4 in ionic 6,i am getting above error while taking build in android studio

They have changed that line on latest release and the commit says “capacitor 4”, so I guess the change they made is not compatible with Capacitor 3.
You’ll have to migrate to Capacitor 4 or downgrade the plugin to a previous version.