Search code examples
react-nativepayment-gatewayrazorpay

How to disable Pay Later payment option in Razorpay react-native


I am using react-native-razorpay in my application. I want to hide some payment methods on the Razorpay payment page.

I am able to hide or disable Net Banking and Wallet options but the Pay Later option doesn't disable.

This the code i used

  var options = {
    image: '',
    currency: 'INR',
    key: '***********',
    amount: Amount,
    name: 'MY APP',
    prefill: {
      email: Email,
      contact: Number,
      name: Name
    },
    theme: {color: 'red'},
    method: {
      netbanking: false,
      card: true,
      wallet: false,
      upi: true,
      paylater: false
    },
  }

  RazorpayCheckout.open(options).then((data) => {})

How to hide or disable Pay Later payment option in react-native-razorpay


Solution

  • config: {
          display: {
            hide: [
            { method: 'paylater' },
            { method: 'emi' }
          ],
          preferences: { show_default_blocks: true }
          }
        }