Skip to main content
Nayax provides an iOS version of the eCom SDK. This guide shows you how to integrate it into your application. You will learn how to install, initialize, and prepare the SDK to facilitate payment creation.

Pre-requisites

To ensure compatibility and optimal performance, your iOS project must meet the following minimum requirements:
  • iOS 14 or a later version
  • Swift 5.0
  • Xcode Version 14.0 or a later version
  • A valid Sign Key (shared by Nayax, typically 16 characters).
  • The associated Sign Key ID.
  • The securityTokenId and securityTokenValue.

Integrate eCom SDK

The integration of eCom SDK consists of four steps:
  1. Install the SDK.
  2. Handle URL callbacks.
  3. Initialize the SDK.
  4. Add Configuration Class.
The sections below provide a detailed description of each step.

Step 1: Install the SDK

To begin integrating the Nayax E-commerce functionality into your application, you’ll first need to set up access to the GitLab repository and then install the SDK as shown below.
Sensitive InformationDo NOT commit the access token to your source control. The token should be treated as a sensitive credential.
  1. The Nayax eCom SDK for iOS is hosted on Nayax’s private GitLab repository. The Nayax Team will provide you with a read-only access token. Configure git to use this token for authentication:
  2. Set up your Podfile with the following code:
Podfile
  1. Before installing, remove any previous integrations:
Terminal
  1. Now, install the pods.
    Terminal

Step 2: Handle URL callbacks

Add the following URL Types entry to your application’s Info.plist file. This configuration allows the SDK to handle callback URLs:
info.plist
Depending on your project setup, whether you use scenes, modify either your SceneDelegate or AppDelegate to handle URL callbacks.
  • If you are using a SceneDelegate, add the following method:
  • If you are using an AppDelegate (without scenes), implement this method:

Step 3: Initialize the SDK

Now initialize the SDK in your application, using the initialize method. Add the following code in your AppDelegate (or your main application entry point):
Sign Key and IDNayax provides the signId, signKey, securityTokenId, and securityTokenValue values during your onboarding. Ensure you handle these values securely.
Swift

Step 4: Add Configuration Class

Add the NayaxEcomConfig struct to set the essential properties of the SDK. This table describes the parameters required to initialize the NayaxEcomConfig object. Now the eCom SDK is integrated into your iOS application, and you can start creating payments through it. Refer to the Front-End Integration guide for more information on how this works.

See Also

Android SDK

Install, initialize, and configure the eCom SDK for Android apps.

Front-End Integration

Integrate a payment page into your app without handling payment processing directly.