API Classes and Methods
API classes and methods available for the Flutter plugin.
Documented below is the API package for the plugin.
open(map<String, dynamic> options)
- Opens the checkout.
on(String eventName, Function listener)
- Registers event listeners for payment events.
eventName : The name of the event.
listener : The function to be called. The listener should accept a single argument of the following type:
◦ PaymentSuccessResponse for EVENT_PAYMENT_SUCCESS
◦ PaymentFailureResponse for EVENT_PAYMENT_FAILURE
◦ ExternalWalletResponse for EVENT_EXTERNAL_WALLET
- Clears all listeners.
options map has
key as a required property in the open checkout method. All other properties are optional. Know about all the options available on checkout form.
The event names have been exposed as
strings by the
The payment was successful.
The payment was not successful.
An external wallet was selected.
Data type Description
string The ID for the payment.
string The order ID if the payment was for an order, otherwise
string The signature to be used for payment verification. Only valid for orders, otherwise
Data Type Description
string The name of the external wallet selected.
The error codes are exposed as integers by the
Razorpay class. The error code is available as the code field of the
PaymentFailureResponse instance passed to the callback.
There was a network error. For example, loss of internet connectivity.
An issue with options passed in
User cancelled the payment.
Device does not support TLS v1.1 or TLS v1.2.
An unknown error occurred.