SwichPay class
Static facade and single public entry point for the SDK.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
availableCategories(
) → Future< List< PaymentCategory> > - Payment method categories enabled for this merchant.
-
initialize(
{required String clientId, required String referrer, required int merchantId, required String appId, required Environment environment, String? baseUrlOverride, String? clientSecret, String? secretHashKey}) → void -
Call once, as early as possible (e.g. in
main()), before any other SwichPay method. -
inquirePaymentSession(
{required String paymentSessionGuid}) → Future< PaymentSessionInquiryResult> - Queries a session's current status.
-
onResult(
void callback(PaymentResult result)) → StreamSubscription< PaymentResult> - Listens for every payment result from pay or presentPaymentSheet.
-
pay(
{required PaymentDetails details, required CardDetails card}) → Future< PaymentResult> -
Submits a payment directly with
cardanddetails. -
presentBankTransferCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone bank transfer checkout.
-
presentCardCheckout(
{required BuildContext context, required PaymentDetails details, bool allowSaveCard = true}) → Future< PaymentResult?> -
Presents a standalone card checkout - matches native's
CardBottomSheet. Requires initialize'ssecretHashKeyto have been set. -
presentEwalletCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone EasyPaisa/JazzCash wallet checkout.
-
presentHostedCheckout(
{required BuildContext context, required PaymentDetails details, List< PaymentCategory> ? categories}) → Future<PaymentResult?> - Opens SwichPay's hosted checkout page full-screen.
-
presentHostedCheckoutSheet(
{required BuildContext context, required PaymentDetails details, List< PaymentCategory> ? categories}) → Future<PaymentResult?> - Same as presentHostedCheckout, but inside a bottom sheet.
-
presentOneBillCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone 1Bill checkout.
-
presentPaymentSheet(
{required BuildContext context, required PaymentDetails details, List< PaymentCategory> ? categories}) → Future<PaymentResult?> - Presents the built-in payment sheet and resolves with the outcome.
-
presentQrCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone QR (RAAST) checkout.
-
presentRtpEwalletCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone RTP Ewallet checkout.
-
presentRtpNowCheckout(
{required BuildContext context, required PaymentDetails details}) → Future< PaymentResult?> - Presents a standalone RTP Now checkout.