You can use these methods for card payment method integration.
The SDK provides a method to get the card network name of the provided 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
andunknown
. - If it is not able to identify the network it returns
unknown
.
razorpay.getCardNetwork(cardNumber);
You can determine the validity of the card number entered using the isValidCardNumber
method. This is a checksum-based method to determine if the entered card number is valid or not.
razorpay.isValidCardNumber(cardNumber);
You can fetch the length of a card number for a specific card network using the getCardNetworkLength
method.
razorpay.getCardNetworkLength(cardNetworkName);