This document presents the steps for integrating the Geidea payment gateway with your iOS mobile application (app).


iOS is a mobile operating system developed by Apple Inc. to power Apple's mobile devices. The Geidea Online Payments SDK is a wrapper that extends the Geidea Payment Gateway, allowing you to take payments through Geidea. You can easily accept credit card payments and other payments through wallet providers.

Integrating our payment gateway with your iOS mobile app has never been easier. Through the Geidea Online Payments SDK, you can integrate our payment gateway with just a few lines of code.


While we make every effort to test software or module or plugin or SDK updates rigorously, there is no guarantee that a plugin or module or SDK would work seamlessly with your device. So please back up your mobile app before updating any plugins or modules or SDKs. This helps you restore your website from backup in case you run into unexpected errors.

Software and plugin or module or SDK updates involve programming code changes. The updates may often request upgrades to the development environment or other hosting software.


You will need a merchant account with Geidea and the following software running on your development environment to integrate your mobile app with the Geidea Online Payments SDK.

iOS11.0 or greater
Swift4.0, 4.2, 5.0 or greater
Geidea Online Payments iOS SDK5.0.0


Sample App Code

We have created a sample app and shared the code here. The code consists of samples for you to use to accelerate your app development.

Step 1 - Add the iOS SDK to your iOS mobile app project

  • Download the GeideaPaymentSDK.XCFramework to your local machine from here.
  • Drag the GeideaPaymentSDK.XCFramework to your frameworks folder in your app.
  • Add the SDK to your target: General -> Frameworks, Libraries and Embedded Content
  • Choose the “Embed & Sign” option on the Embed tab
  • If you are using Objective-C to instrument your mobile app, please perform the following additional step
    • Build settings -> Build Options -> Always Embed Swift Standard Libraries -> set YES
  1. Import the SDK
import GeideaPaymentSDK
  1. Set your merchant credentials (Merchant Public Key and API password) with the following method
GeideaPaymentAPI.setCredentials(withMerchantKey: <YOUR_MERCHANT_KEY>, andPassword: <YOUR_PASSWORD>)
  1. You can check if the credentials are already stored with the GeideaPaymentAPI.isCredentialsAvailable() method. It is only important to be stored prior to using the SDK.


  • The setCredentials() method is used to store your credentials securely on the device by using encryption. So it is not required to set them on each app start event. You could set them once per installation of the app on the device.
  • As a good security and coding practice, do not hard-code your merchant password directly into your APK file. Always get it securely and dynamically (from the secure endpoint of your backend or some secure server) where the password has been stored with encryption.
  1. To verify your merchant key and config
 GeideaPaymentAPI.getMerchantConfig(completion:{ response, error in
    //verify the response
  1. You can make payments using the pay method on the SDK amount: GeideaPaymentSDK.GDAmount, 
                    withCardDetails cardDetails: GeideaPaymentSDK.GDCardDetails, 
                    initializeResponse: GeideaPaymentSDK.GDInitiateAuthenticateResponse? = nil, 
                    config: GeideaPaymentSDK.GDConfigResponse?, 
                    isHPP: Bool = false, 
                    showReceipt: Bool, 
                    andTokenizationDetails tokenizationDetails: GeideaPaymentSDK.GDTokenizationDetails?,
                    andPaymentIntentId paymentIntentId: String? = nil, 
                    andCustomerDetails customerDetails: GeideaPaymentSDK.GDCustomerDetails?, 
                    orderId: String? = nil, 
                    paymentMethods: [String]? = nil, 
                    dismissAction: ((GeideaPaymentSDK.GDCancelResponse?, GeideaPaymentSDK.GDErrorResponse?) -> Void)? = nil, 
                    navController: UIViewController, 
                    completion:{ response, error in

                        // handle response for payment success