EdfaPay Logo
v1.0.0-beta.2
AndroidiOSFlutter

EdfaPay Payment Gateway SDK

A production-grade Kotlin Multiplatform payment SDK for Android and iOS, with a matching Flutter plugin. One codebase delivers a Compose Multiplatform checkout experience, native Apple Pay, the full transaction lifecycle (authorise, capture, refund, void, recurring), external providers (tabby, tamara, checkout, SADAD), and 3-D Secure 2 — all through a single entry point: EdfaPgSdk.

Overview

The EdfaPay Payment Gateway SDK is built on **Kotlin Multiplatform**: shared Kotlin business logic, UI, and networking, with native bindings for Android (Maven Central) and iOS (CocoaPods, Swift Package Manager, XCFramework). A thin Flutter plugin bridges the same native SDK to Dart, so all three platforms share one behaviour and one API shape. Everything you need — the drop-in checkout UI, direct (headless) sales, Apple Pay, post-sale operations, external providers, and ledger queries — is reached through a single entry point, `EdfaPgSdk`, plus a focused set of public data models.

One SDK, three surfaces

The KMP module (edfapay-pg-sdk-kmp) is the source of truth for all payment logic; the Flutter plugin (edfapay-pg-plugin-flutter) is a generic RPC bridge with no business logic. Android uses Kotlin, iOS uses Swift, Flutter uses Dart — the method names and data models line up across all three.

Supported Platforms

System Requirements

RequirementValue
Minimum SDK24 (Android 7.0)
VerifiedAPI 36
ToolchainJVM 17, Kotlin 2.3, Jetpack Compose
Artifactcom.edfapay.pg:sdk:<version> (Maven Central)
UI requirementJetpack Compose (ComponentActivity + setContent) for the bundled UI

Highlights

The SDK keeps a small surface area while covering the full payment lifecycle.

Drop-in Checkout UI

Themeable Compose Multiplatform card-input flow — three pre-built designs, English / Arabic, with built-in 3-D Secure 2 WebView handling.

Headless Mode

Already have a checkout? Go straight to EdfaPgSdk.sale(...) with your own card capture.

Apple Pay, Natively

Wired to PKPaymentAuthorizationViewController — you bring the merchant ID, the SDK drives the sheet and the decrypted-payload sale.

Full Lifecycle

Authorise, capture, refund, void, and recurring / MIT charges through a single coroutine-friendly API.

External Providers

One unified externalPayment call routes to tabby, tamara, hosted checkout, or SADAD via an enum.

Ledger Queries

Paginated transaction search plus single-row helpers by UUID, merchant orderId, or RRN.

Security-first Logging

Curl-style request logs with API key, PAN (last-4 preserved), CVV, and recurring-token redaction — opt-in.

Coroutine / Async Friendly

suspend functions on Kotlin, async/await on Swift, and Future-returning calls on Dart.

Public API Surface

The entire public API is reached through EdfaPgSdk and the CardPay builder it hands you. All transaction calls are asynchronous — invoke from a coroutine on Android, a Swift Task on iOS, or await the returned Future on Flutter.

GroupEntry point
Lifecycleinitialize(apiKey, baseUrl) · reinitialize(...) · enableLogs / setEnableLogs(...)
Bundled card-pay UIEdfaPgSdk.CardPay() / cardPay() … initialize(onDismiss) / start()
Direct saleEdfaPgSdk.sale(SaleRequest)
Apple PayEdfaPgSdk.applePay(ApplePayRequest)
Post-sale operationsvoid(id) · capture(id, amount) · refund(id, amount) · recurring(RecurringRequest)
External paymentsexternalPayment(ExternalPaymentRequest) — tabby / tamara / checkout / SADAD
QuerygetTransactions(filter) · getTransactionById(id) · getTransactionByOrderId(orderId) · getTransactionByRrn(rrn)

Quickstart

Initialise the SDK and take your first SAR 1.00 sale in under five minutes. Full setup is in the Installation and Initialization guides.

Loading...

Ready to integrate?

Head to the Installation guide for platform-by-platform setup, then Initialization to wire up your API key and base URL.