Payment Gateway Mobile SDKs
Integrate DigetPay into your mobile application using our SDKs for Flutter and native Android.
Both SDKs support DigetPay's hosted checkout flow, allowing customers to complete their payment through a DigetPay-hosted payment page while your application receives the final payment result.
Choose Your SDK
| SDK | Platform | Current Version | Minimum Support |
|---|---|---|---|
| Flutter SDK | Android / iOS | 0.5.0 | Android 7.0 / iOS 13.0 |
| Android Native SDK | Android | 1.0 | Android API 24 |
Choose the SDK that matches your application:
- Flutter — Use the Flutter SDK for applications built with Flutter.
- Android Native — Use the Android SDK for native Android applications built with Kotlin or Java.
Flutter SDK
The DigetPay Flutter SDK is a pure-Dart package that provides a hosted checkout experience through a WebView. It supports Android and iOS applications.
Quick Start
Initialize the SDK once when your application starts:
DigetPaySdk.initialize(
apiKey: '
Launch a hosted checkout:
await DigetPaySdk.cardPay()
.setOrder(
DigetPaySaleOrder(
id: orderId,
description: 'Coffee',
currency: 'SAR',
amount: 15,
),
)
.setPayer(payer)
.onTransactionSuccess((res) {tionId}');
)
.onTransactionFailure((res) {neReason}');
)
.onDismiss(() {
cancelled');
)
.start(context);
The SDK reports the payment outcome through the success, failure, or cancellation callbacks.
Full Flutter documentation: digetpay_plugin on pub.dev
Android Native SDK
The DigetPay Android SDK provides native Android integration for hosted checkout, payment operations, recurring payments, and transaction handling.
It supports both Kotlin and Java, with Android API 24 or later.
Quick Start
Initialize the SDK once when your application starts:
DigetPay.initialize(
context = this,
config = DigetPayConfig(
apiKey = "YOUR_API_KEY",
environment = Environment.SANDBOX,
enableLogging = BuildConfig.DEBUG
)
)
Launch a hosted checkout:
DigetPay.checkout(
activity = this,
request = CheckoutRequest(
merchantOrderId = "ORDER-123",
amount = 125.0,
currency = "SAR",
customerName = "Ahmed Ali",
customerEmail = "[email protected]",
customerPhone = "+966501234567"
),
callback = object : PaymentCallback {
override fun onSuccess(result: PaymentResult) {
actionId.
override fun onFailure(error: PaymentError) {
override fun onCancelled() {
checkout screen.
}
)
The SDK handles the hosted checkout flow and returns the final outcome through PaymentCallback.
Full Android documentation: DigetPay Android SDK
Recommended Payment Flow
For most mobile applications, Hosted Checkout is the recommended payment flow:
- Initialize the SDK with your mobile API key and environment.
- Create and launch a checkout.
- Let the customer complete the payment through DigetPay-hosted checkout.
- Handle the success, failure, or cancellation result returned by the SDK.
- Store the relevant payment identifiers on your backend.
- Verify the final transaction status before fulfilling the order.
Do not rely only on the visual success page to confirm a payment. For critical order state, verify the final transaction status using the appropriate DigetPay status API or server-side mechanism.
SDK Capabilities
Both SDKs are designed around DigetPay's payment services, while the exact capabilities depend on the platform and SDK version.
| Capability | Flutter | Android |
|---|---|---|
| Hosted Checkout | ✓ | ✓ |
| Card Payments | ✓ | ✓ |
| 3-D Secure | ✓ | ✓ |
| Transaction Status | ✓ | ✓ |
| Refunds | ✓ | ✓ |
| Capture / Void | ✓ | ✓ |
| Recurring Payments | ✓ | ✓ |
| Transaction History | ✓ | ✓ |
For platform-specific capabilities and API details, see the full SDK documentation.
Versioning & Compatibility
Flutter SDK
| Requirement | Supported Version |
|---|---|
| Current SDK version | 0.5.0 |
| Android | Android 7.0+ |
| Android API | 24+ |
| iOS | iOS 13.0+ |
| Language | Dart |
| Platforms | Android / iOS |
The Flutter SDK is a pure-Dart package and uses standard Flutter WebView and networking components. Flutter Web and desktop are not supported in the current version.
Android Native SDK
| Requirement | Supported Version |
|---|---|
| Current SDK version | 1.0 |
| Minimum Android SDK | API 24 |
| Android version | Android 7.0+ |
| Recommended Compile SDK | 36 |
| Kotlin | 2.0+ |
| Java target | 11 |
| Languages | Kotlin / Java |
Version and compatibility requirements may change with future releases. Always check the platform-specific documentation before upgrading your SDK.
Security
Mobile SDK credentials are embedded in the application and may potentially be extracted.
Use a restricted or publishable mobile API key intended for client-side use. Never embed server-side secrets or privileged credentials in your mobile application.
For card payments, prefer Hosted Checkout whenever possible. Raw card data does not pass through your application when using the hosted checkout flow, helping keep your PCI-DSS scope smaller.
Sensitive operations and business logic should be handled by your backend.
Next Steps
Updated 28 days ago

