Additional Support for Payment Methods

Additional support features available for Cards and Wallets.


Use the Razorpay React Native Custom UI SDK to integrate supported payment methods on the Checkout form of your app as per your business requirements.

Handy Tips

Ensure you have called Razorpay.initRazorpay(key) in your build integration before using any of the methods on this page. Know more about

.

Use the

to fetch the payment methods available for your account.

Razorpay.getPaymentMethods().then(paymentMethods => {
console.log(paymentMethods);
});

The response includes the list of enabled payment methods, available banks for netbanking, and EMI plans for eligible cards.

Below are the sample payloads for each payment method.

For card payments, specify method as card and pass the card details as shown below:

Razorpay.open({
description: 'Credits towards consultation',
currency: 'SGD',
key_id: '<YOUR_KEY_ID>',
amount: '5000',
email: 'alex.lim@example.com',
contact: '+6591119111',
order_id: 'order_9A33XWu170gUtm',
method: 'card',
card: {
number: '4386281111111112',
name: 'Alex Lim',
expiry_month: '10',
expiry_year: '30',
cvv: '123'
}
}).then((data) => {
// handle success
alert(`Success: ${data.razorpay_payment_id}`);
}).catch((error) => {
// handle failure
alert(`Error: ${error.code} | ${error.description}`);
});

For PayNow payments, specify method as paynow as shown below:

Razorpay.open({
description: 'Credits towards consultation',
currency: 'SGD',
key_id: '<YOUR_KEY_ID>',
amount: '5000',
email: 'alex.lim@example.com',
contact: '+6591119111',
order_id: 'order_9A33XWu170gUtm',
method: 'paynow'
}).then((data) => {
// handle success
alert(`Success: ${data.razorpay_payment_id}`);
}).catch((error) => {
// handle failure
alert(`Error: ${error.code} | ${error.description}`);
});

You can use these methods for card payment method integration.

The SDK provides a method to get the card network name of the card number.

  • At least 6 digits of the card number are required to identify the network.
  • Possible values returned by this method are visa, mastercard, amex and unionpay.
  • If it cannot identify the network, it returns unknown.
//needs Razorpay.initRazorpay()
Razorpay.getCardsNetwork('4386281111111112').then(resp => {
console.log(resp.data); // returns visa
});

The SDK provides a checksum-based method to determine if the entered card number is valid or not.

//needs Razorpay.initRazorpay()
Razorpay.isValidCardNumber('4386281111111112').then(resp => {
console.log('is card number valid:');
console.log(resp.data); // returns true or false
});

The SDK provides a method to get the card number length for a specific card network.

Razorpay.getCardNetworkLength('visa').then(resp => {
console.log(resp.data); // returns 16 for visa
});

The SDK provides a method to get the wallet logo URL.


Is this integration guide useful?