Welcome to the Olo Pay SDK

PCI compliance is your responsibility but the Olo Pay SDK simplifies your process of maintaining PCI compliance by doing the heavy lifting of processing sensitive credit card data for you. See below for details on adding the SDK to your project and integrating it into your app to submit payments to Olo’s Ordering API.

Setup

Use one of the following guides to add the Olo Pay SDK to your Xcode project

Getting Started

The Olo Pay SDK helps with PCI compliance by creating a token to represent sensitive credit card data. The tokenized data is then used in your app to submit payments via Olo’s Ordering API. The Olo Pay SDK supports two different types of tokens: Payment Method and CVV Update tokens. Specific details about each token and how to use the SDK to generate them can be found below.

Payment Methods (new cards & digital wallets)

This approach is used for cards that have not previously been saved on file with Olo. This includes new credit cards and digital wallets. With this tokenization approach, an OPPaymentMethodProtocol is created that is then used to submit a basket with Olo’s Ordering API.

  1. Initialize the SDK. It is recommended to initialize on application startup, but it can be initialized anywhere in your app that is convenient.

    Note

    It is important to make sure the SDK is initialized prior to calling methods that generate payment methods

  2. Choose how to create a payment method

  3. Submit the OPPaymentMethodProtocol data to the Basket Submit endpoint of Olo’s Ordering API

CVV Update Tokens (previously saved cards)

This approach is used for cards that have previously been saved on file with Olo, and you want to reverify the CVV of the saved card prior to submitting a basket and processing a payment. With this tokenization approach, an OPCvvUpdateToken is created that is then used to submit a basket with Olo’s Ordering API.

Note

It is up to you to determine when to verify the CVV on a saved card.

  1. Initialize the SDK. It is recommended to initialize on application startup, but it can be initialized anywhere in your app that is convenient.

    See

    OloPayApiInitializer.setup(with:completion:)

    Note

    It is important to make sure the SDK is initialized prior to calling methods that generate payment methods

  2. Add the CVV control to your app

    See

    OPPaymentCardCvvView. This will display an input field for entering a CVV value. It can be styled and customized to meet your needs.
  3. Get an OPCvvTokenParamsProtocol instance

  4. Generate an OPCvvUpdateTokenProtocol instance

  5. Submit the OPCvvUpdateTokenProtocol data to the Basket Submit endpoint of Olo’s Ordering API