Skip to main content

Interface Methods

getPaymentMethods

Use this method for fetching the payment methods:
Get Payment Methods

getAppsWhichSupportUpi

Use this method for fetching those apps on the customer’s phone which support UPI payments:
Get Apps which support UPI

getCardNetwork

Use this method to get the card network. This function expects the card number as a parameter and returns the card network. For example, VISA, Mastercard, RuPay and so on:
Get Card Network

isValidCardNumber

Use this method to validate the card number. This function returns a boolean value that determines the card is valid or invalid:
Is Valid Card Number

getBankLogoUrl

You must use bank code as the method parameter returned in the getPaymentMethod() to fetch the bank logo URL.
Get Bank Logo URL

changeApiKey

Use this method for changing the API keys:
Change API Key

getCardNetworkLength

Use this method for fetching the card network length:
Get Card Network Length

getSubscriptionAmount

Use this method for fetching the subscription amount using the subscription_id:
Get Subscription Amount

getWalletLogoUrl

Use this method for fetching the wallet logo URL:
Get Wallet Logo URL

Submit

Use this method for submitting the payment details:
Submit Payment Details

Listening to Events

Events are triggered from the SDK for handling success or error on payments, Register for these events in the initState() method in their flutter apps as given below:
Listening to Events

Error Codes

The error codes have been exposed as integers by the Razorpay class. The error code is available as the code field of the PaymentFailureResponse instance passed to the callback.

Error Code | Description

NETWORK_ERROR | There was a network error. For example, loss of internet connectivity.

INVALID_OPTIONS | An issue with options passed in Razorpay.open.

PAYMENT_CANCELLED | User cancelled the payment.

TLS_ERROR | Device does not support TLS v1.1 or TLS v1.2.

UNKNOWN_ERROR | An unknown error occurred.