Additional Support for Payment Methods
Additional support features available for Cards and Wallets.
Use the Razorpay React Native SDK to integrate supported payment methods on the Checkout form of your app as per your business requirements. Here are some additional methods provided by the SDK for the integration and usage of payment methods:
Use the
to fetch the payment methods available for your account.Below are the sample payloads for each payment method.
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
, andunionpay
. - If it cannot identify the network, it returns
unknown
.
//needs Razorpay.initRazorpay()Razorpay.getCardsNetwork('4842793002086571').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('4842793002086571').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});
Given below are the sample codes for fetching various payment method logo URLs.
The SDK provides a method to get the wallet logo's URL.
//needs Razorpay.initRazorpay()Razorpay.getWalletLogoUrl('touchngo').then(resp => {console.log(resp.data); returns URL: https://cdn.razorpay.com/wallet/mobikwik.png});
The SDK provides a method to get the wallet's square-shaped logo's URL.
//needs Razorpay.initRazorpay()//returns square wallet logo urlRazorpay.getSqWalletLogoUrl('touchngo').then(resp => {console.log(resp.data); returns url for Square Logo});
Is this integration guide useful?
ON THIS PAGE