---
updatedAt: 2026-04-09T09:08:02.000Z
agentTools:
  projectIndex: https://docs.geidea.net/llms.txt
---

# iOS SDK (Old)

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

## Overview

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.

<br />

## Features

The iOS SDK includes the below features

| Feature                              | Comments                                    |
| :----------------------------------- | :------------------------------------------ |
| Card Payments - Geidea Hosted Form   |                                             |
| Card Payments - Merchant Hosted Form | Merchants will need to be PCI-DSS certified |
| Hosted Payment Page Solution         |                                             |

## Pre-requisites

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.

| Software                       | Version                  |
| ------------------------------ | ------------------------ |
| iOS                            | 11.0 or greater          |
| Swift                          | 4.0, 4.2, 5.0 or greater |
| Geidea Online Payments iOS SDK | 5.0.0                    |

> 👍 Sample App Code
>
> We have created a sample app and shared the code [here](https://github.com/GeideaSolutions/iOS-SDK-SampleApp). 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](https://github.com/GeideaSolutions/iOS-SDK).
* 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

```swift
import GeideaPaymentSDK
```

2. Set your merchant credentials (Merchant Public Key and API password) with the following method

```swift
GeideaPaymentAPI.setCredentials(withMerchantKey: `<YOUR_MERCHANT_KEY>`, andPassword: `<YOUR_PASSWORD>`)
```

3. 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.

IMPORTANT:

* 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.

4. To verify your merchant key and config

```swift
 GeideaPaymentAPI.getMerchantConfig(completion:{ response, error in
    //verify the response
 })
```

5. You can make payments using the pay method on the SDK

```swift
GeideaPaymentAPI.pay(theAmount 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

                    })
```

<script src="https://global.localizecdn.com/localize.js"></script>

<script>{`!function(a){if(!a.Localize){a.Localize={};for(var e=["translate","untranslate","phrase","initialize","translatePage","setLanguage","getLanguage", "getSourceLanguage","detectLanguage","getAvailableLanguages","untranslatePage","bootstrap","prefetch","on","off","hideWidget","showWidget"],t=0;t<e.length;t++)a.Localize[e[t]]=function(){}}}(window);`}</script>

<script>{`Localize.initialize({key: 'SDt2zs6IAj3cO', rememberLanguage: true});`}</script>