Package selection guidance compiled from public package information, community data, and project usage.
The HyperPay Plugin is a Flutter/Dart package that enables seamless integration of the HyperPay end-to-end payment gateway into mobile applications. Designed for Android and iOS, it simplifies the process of adding secure, reliable payment processing with minimal setup. The plugin provides a straightforward API to handle transactions, tokenization, and payment confirmation, ensuring a smooth checkout experience. It's ideal for developers aiming to support multiple payment methods through a unified interface. With official support from the HyperPay platform, it ensures compliance with industry standards and real-time transaction tracking.
Use cases
In-app purchases
E-commerce checkout
Mobile wallet integration
Subscription billing
Payment processing for digital services
Key features
Cross-platform support (Android & iOS)
Secure payment tokenization
Easy integration with HyperPay gateway
Real-time transaction status
Support for multiple payment methods
Suitable for
Flutter developers building e-commerce apps
Startups needing fast payment integration
Apps requiring multi-currency support
Developers using HyperPay as their payment provider
Projects with strict security and compliance needs
Considerations
Requires HyperPay account and API credentials
Limited to HyperPay's supported regions
Dependent on external gateway stability
Needs proper handling of error states
May require additional configuration for advanced features
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
HyperPay SDK Plugin
The HyperPay platform offers a complete, easy-to-use guide to enable seamless integration of our end-to-end payment gateway for mobile and desktop browsers. Through a unified API, you can enable and gain access to all platform features. Choose one of the options below to quickly get started
Support ReadyUI , CustomUI
VISA,MasterCard
STC
Apple Pay
MADA( Saudi Arabia )
Android Setup
Open android/app/build.gradle and add the following lines
shopperResultUrl since mSDK version 6.0.0 the shopper result URL is not required
The Scheme field must match the InAppPaymentSetting.shopperResultUrl field.
Don't make Scheme like com.testPayment.Payment avoid capital letters in Android.
It's used when making a payment outside the app (Like open browser) and back into the app
IOS Setup
Open Podfile, and paste the following inside of it:
pod 'hyperpay_sdk', :git => 'https://github.com/ahmedelkhyary/hyperpay_sdk.git'
$static_framework = ['hyperpay_plugin']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
Add Url Scheme to the list of bundle identifiers.
The Url Scheme field must match the InAppPaymentSetting.shopperResultUrl field.
Setup HyperPay Environment Configuration
define instanse of FlutterHyperPay
lateFlutterHyperPay flutterHyperPay ;
flutterHyperPay = FlutterHyperPay(
shopperResultUrl: InAppPaymentSetting.shopperResultUrl, // return back to app
paymentMode: PaymentMode.test, // test or live
lang: InAppPaymentSetting.getLang(),
);
create a method to get the checkoutId
/// URL TO GET CHECKOUT ID FOR TEST /// THIS LINK UNAVAILABLE NOW/// http://dev.hyperpay.com/hyperpay-demo/getcheckoutid.php/// Brands Names [ VISA , MASTER , MADA , STC_PAY , APPLEPAY]getCheckOut() async {
final url = Uri.parse('https://dev.hyperpay.com/hyperpay-demo/getcheckoutid.php');
final response = await http.get(url);
if (response.statusCode == 200) {
payRequestNowReadyUI(
checkoutId: json.decode(response.body)['id'],
brandsName: [ "VISA" , "MASTER" , "MADA" ,"PAYPAL", "STC_PAY" , "APPLEPAY"]);
}else{
dev.log(response.body.toString(), name: "STATUS CODE ERROR");
}
}
If you want using readyUI send checkoutId and List of brandsName to Plugin
Brands Names support [ VISA , MASTER , MADA , STC_PAY , APPLEPAY]
payRequestNowReadyUI(
{requiredList<String> brandsName, requiredString checkoutId}) async {
PaymentResultData paymentResultData;
paymentResultData = await flutterHyperPay.readyUICards(
readyUI: ReadyUI(
brandsName: brandsName ,
checkoutId: checkoutId,
merchantIdApplePayIOS: InAppPaymentSetting.merchantId, // applepay
countryCodeApplePayIOS: InAppPaymentSetting.countryCode, // applePay
companyNameApplePayIOS: "Test Co", // applePay
themColorHexIOS: "#000000" ,// FOR IOS ONLY
setStorePaymentDetailsMode: true// store payment details for future use
),
);
}
classInAppPaymentSetting{
// shopperResultUrl : this name must like scheme in intent-filter, url scheme in xcode// Avoid capital letters like `com.testPayment.Payment`, as it will not work in Android.staticconstString shopperResultUrl= "com.testpayment.payment";
staticconstString merchantId= "MerchantId";
staticconstString countryCode="SA";
staticgetLang() {
if (Platform.isIOS) {
return"en"; // ar
} else {
return"en_US"; // ar_AR
}
}
}