Last Updated: 23 August 2024 | Change Log

iOS SDK


Create your own uniquely styled and branded checkout form by integrating our SDK into your native app.

Read more about the Checkout SDK and the supported payment journeys here.

Note

Make yourself familiar with our API Principles to ensure a resilient integration.

How does it work?

We are securing your customer's payment details by creating a session. You can then create a token with the card details and optionally use the CVC to take a payment.

What is a session?

A session is a unique identifier for your customer's card details, generated by the SDK.

Get our SDK

Our iOS SDK is available via Cocoapods as well as Swift Package Manager.

Note
Only our latest iOS SDK versions from 2.4.0 will be available on swift package manager.

Cocoapods

Once you've installed and configured your project to use Cocoapods, add the following line to your projects Podfile to add our SDK.

pod 'AccessCheckoutSDK'

Here is a link to the homepage of our SDK on Cocoapods:

Swift Package Manager

Support for Swift Package Manager is available in the Access Checkout iOS SDK from version 2.4.0 onwards.

Once you've configured your project to use Swift Package Manager, you can add the iOS SDK as a dependency in either of the two ways:

You will then need to specify the URL of the Access Checkout iOS SDK GitHub repository.

Import

You must import the Access Checkout module to have access to all the classes, methods and functions you need to create your form and generate sessions.

Here is an example of how you would import the Access Checkout module into your swift file.

import AccessCheckoutSDK

After importing the Access Checkout module, we recommend you extend your ViewController with UIViewController.

class ViewController: UIViewController {
    ...

What to do next

See our guides on how to create sessions you can use to take a payment:

Note

For one-time payments, you would need to delete the token after you take the payment.

Create a session to pay with a card

  1. Submit card details to create a session
  2. Create a verified token
  3. Take a payment with this token

Create sessions to pay with a card and CVC

  1. Submit card details and CVC to create two separate sessions
  2. Create a verified token with your card session
  3. Use your cvc session and verified token in our card/checkout payment instrument to take a payment using one of the following endpoints:

Create a session for CVC only and pay with a stored token

  1. Submit the CVC to create a session
  2. Use your cvc session and stored verified token in our card/checkout payment instrument to take a payment using one of the following endpoints: