Fastcheckout SDK iOS configuration manual

Introduction

The Fastcheckout SDK is a library that you can integrate into your native Android, iOS and/or React Native application providing connection to MultiSafepay services. The Fastcheckout SDK adds a smooth, fast and native checkout experience to your mobile app, and by storing and reusing data it is the fastest checkout process available for shopping apps.

As an integrator, you only need to provide a valid MSP transaction identifier or create a transaction. The Fastcheckout SDK leverages the checkout process for you, providing notifications for all possible outcomes (success, pending, canceled, etc.) once it completes a transaction. The checkout process flow includes:

  • Shipping details:
    • Preferred shipping details
    • Add shipping details
  • Payment methods:
    • Preferred payment methods
    • Add payment methods
    • Coupons
  • Confirmation details

Additional details

The Fastcheckout SDK provides the additional following features:

  • Authentication into Fastcheckout:
    • It provides secure sign-up/login functionality
  • Check orders:
    • Open seamless support tickets to related orders
  • Support orders:
    • Easily open a support ticket related to an order
  • Edit payment information:
    • List and edit user’s stored payment details
  • Manage shipping addresses:
    • List, add and edit shipping information

If you need more information, please check the documentation that you will find inside the SDK, which contains all classes, methods, common troubleshooting and more details.

Please refer to the Multisafepay API Documentation to perform different calls through which you can start transactions, update transactions, perform refunds and receive information about transactions: https://docs.multisafepay.com/api/#orders

Requirements

  • Xcode 10.2 and iOS 12 SDK
  • iOS 9+ target
  • Swift 5.0 or Objective-C

Installation

First you have to access into your Back Office and get a valid API Key (Settings → Website Settings) Once you have your valid API Key, simply download the Android and/or iOS SDK version.

Add the FastcheckoutKit.framework as an embedded framework into your project. The next steps will guide you through the process:

  1. Open the folder in Finder where you have downloaded FastcheckoutKit.framework and drag it into the Project Navigator of your application’s Xcode project.
  2. Make sure you select Copy items if needed unless you have already copied the framework into your project folder.
  3. Select your application project in the Project Navigator (blue project icon) to navigate to target configuration window and select the application target under the Targets heading in the sidebar.
  4. In the tab bar at the top of that window, open the General panel.
  5. Click on the + button under the Embedded Binaries section.
  6. Select FastcheckoutKit.framework

You can now start using the FastcheckoutKit SDK in your App.

Demo

You can easily integrate Fastcheckout iOS SDK into your app, you just need to follow the next steps:

  1. Setup iOS SDK
import FastcheckoutKit

let manager = FastcheckoutManager(client: FastcheckoutClient(apiKey: "API_KEY"))
  1. Start checkout with completion callback
manager.startCheckout(transactionId: "ID", host: self, onCompletion: { status, error in
    if let status = status {
        print(status)
    } else {
        print(error?.localizedDescription)
    }
})

And that’s it, that’s all you need to do to integrate the iOS SDK to start a checkout and retrieve the transaction status once it completes.

Complete example

import UIKit
import FastcheckoutKit

class ViewController: UIViewController {

   private let manager = FastcheckoutManager(client: FastcheckoutClient(apiKey: "API_KEY"))

   override func viewDidLoad() {
       super.viewDidLoad()

       // Add a button to the navigationBar
       let startButton = UIBarButtonItem(title: "Start",
                                         style: .done,
                                         target: self,
                                         action: #selector(self.startCheckout))
       navigationItem.rightBarButtonItem = startButton
   }

   // MARK: Actions

   @objc func startCheckout() {
       manager.startCheckout(transactionId: "id", host: self, onCompletion: { status, error in
           if let status = status {
               print(status)
           } else {
               print(error?.localizedDescription)
           }
       })
   }

}

SDK Snapshots:

  1. The following snapshots will walk you through some of features offered by the Fastcheckout iOS SDK.

    • Logging in with a registered email:

    • Logging in with a non-registered email will automatically take the user to the register SDK screen:

    • If the user is registered and resets its email account, the SDK will automatically send a new security code to new entered email:

    • Once the user enters the security code received by email (if the security code is received via SMS it will automatically get added to appropriate field, and the SDK will move into the following state) the SDK will ask for a new security PIN, once entered, the SDK will provide Biometric options (in iOS face recognition is also available):
    • The checkout process follows. From a merchant’s shop checkout option, the SDK enters into the checkout process. The first view will be the delivery view with shipping options if available. Once the continue button is selected, the SDK moves into the Payment screen and the payment logic follows.

    • Once the payment process is completed the SDK will proceed to the “transaction is complete” screen. The SDK callback will notify the client App about this or any other results (uncleared, cancel, etc.). Pressing the button “Back to Shop” will redirect the user to the Merchant’s shop.