Change API Key
Call the following function after the successful SDK initialization and change the API key:Change API Key
Card Utilities
Fetch Card Network
The SDK provides a method to get the card network of the card. At least six digits of the card number are required to identify the network. The below method fetches the card network for a card. A minimum of 6 digits is required to identify the network.Get Card Network
visamastercardmaestro16amexrupaymaestroanddiners
unknown.
Card Number Validation
The entered card number can be validated using the checksum-based method.Card Number Validation
Fetch Card Number Length for Card Network
Use the below method to fetch the card number’s length for a card network:Fetch Card Number Length for Card Network
Save Card Details
You can save the card details as tokens with Razorpay. On repeat visits, the customers can complete the payment quicker by just entering thecvv of the card.
To implement the save cards feature in your app:
1
Step 1
2
3
Step 3
Step 1: Create a Customer
Create a customer, whose card details should be saved, from the Dashboard or Customers API. /customersRequest
Step 2: Create a Token
Use the following code to create a token.Swift
options dictionary:
customer_id
: NSString Unique identifier of the customer. Obtained from the response of the previous step.
save
: NSString Specifies if the card details should be stored as tokens. Possible values are:
1: Saves the card details.0(default): Does not save the card details.
Fetch Logos
Fetch Bank Logo URL
Use the below method to fetch the bank logo URL. HerebankCode is the code of the bank. This should be available in the response received in the onPaymentMethodsReceived callback.
Fetch Bank Logo URL
Fetch Wallet Logo URL
Use the below method to fetch the wallet logo URL:Fetch Wallet Logo URL
Fetch Wallet Square Logo URL
Use the below method to fetch the wallet square image logo URL:Fetch Wallet Square Logo URL