diff --git a/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php b/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php
index 12bbf98..98339f3 100644
--- a/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php
+++ b/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php
@@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Request;
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsRefundsInterface;
 
 /**
  * Provides the Off-site Redirect payment gateway.
@@ -34,7 +35,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  *   },
  * )
  */
-class RazorpayRedirect extends OffsitePaymentGatewayBase {
+class RazorpayRedirect extends OffsitePaymentGatewayBase implements SupportsRefundsInterface {
 
   /**
    * Constructs a RazorpayRedirect object.
@@ -213,9 +214,9 @@ class RazorpayRedirect extends OffsitePaymentGatewayBase {
     $razorpay_payment = $api->payment->fetch($razorpay_payment_id);
 
     if (!in_array($payment->getState()->value,
-      ['capture_completed', 'capture_partially_refunded']
+      ['completed', 'capture_partially_refunded']
     )) {
-      throw new \InvalidArgumentException('Only payments in the "capture_completed" and "capture_partially_refunded" states can be refunded.');
+      throw new \InvalidArgumentException('Only payments in the "completed" and "capture_partially_refunded" states can be refunded.');
     }
 
     // If not specified, refund the entire amount.
@@ -238,7 +239,7 @@ class RazorpayRedirect extends OffsitePaymentGatewayBase {
       else {
         $payment->state = 'capture_refunded';
         // For partial refund.
-        $razorpay_payment->refund(['amount' => $new_refunded_amount * 100]);
+        $razorpay_payment->refund(['amount' => ($new_refunded_amount->getNumber() * 100)]);
       }
 
       $payment->setRefundedAmount($new_refunded_amount)->save();
