khalti_checkout_flutter library
Classes
- ExceptionHttpResponse
- The exception for KhaltiClient.
- FailureHttpResponse
- The failure response for KhaltiClient.
- HttpResponse
- The response for KhaltiClient.
- Khalti
- The entrypoint class for Khalti.
- KhaltiClient
- The base http client to make request to Khalti server.
- KhaltiConfig
- The configuration class for Khalti Payment Gateway.
- KhaltiPayConfig
- A class to hold necessary informations for loading the flutter SDK.
- KhaltiService
- The wrapper class to access Khalti Payment Gateway API.
- PaymentDetailModel
- This class holds necessary information that is necessary for the payment webview to load.
- PaymentPayload
- Response model for payment verification lookup.
- PaymentResult
- The result after making either a successful or unsuccessful payment.
- Platform
- Information about the environment in which the current program is running.
Enums
- Environment
- Environment to choose to different API endpoints based on the selected Environment.
- KhaltiEvent
- Various events associated with different actions.
Constants
- prodBaseUrl → const String
- Production base URL for API endpoints.
- prodPaymentUrl → const String
- Production payment URL
- returnUrl → const String
-
API to fetch the
return_url - testBaseUrl → const String
- Staging base URL for API endpoints.
- testPaymentUrl → const String
- Test payment URL
- transactionVerificationLookup → const String
- Payment Status Verification API URL
Typedefs
-
OnMessage
= FutureOr<
void> Function(Khalti khalti, {Object? description, KhaltiEvent? event, bool? needsPaymentConfirmation, int? statusCode}) - Callback for when any exceptions occur.
-
OnPaymentResult
= FutureOr<
void> Function(PaymentResult paymentResult, Khalti khalti) - Callback for when a successful or failed payment result is obtained.
-
OnReturn
= FutureOr<
void> Function() -
Callback for when user is redirected to
return_url.
Exceptions / Errors
- HttpException
- SocketException
- Exception thrown when a socket operation fails.