OloPaySDK

Getting Started

Useful Links:


The Olo Pay SDK enables easy PCI-compliant payment integration with the Olo Ordering API. At a high level, usage follows this paradigm:


  1. Add the SDK as a dependency

    • Using Gradle/Maven (Recommended)

      • Add the following to your app's gradle file implementation com.olo.olopay:olo-pay-android-sdk:version

    • Using The Compiled Library Directly

      • NOTE: Steps will vary based on your chosen IDE and build system. Steps provided are for Android Studio/Gradle

      • Add the following to your app's gradle file

        • implementation files('/path/to/aar')

        • implementation "com.stripe:stripe-android:20.4.0"

        • implementation "androidx.core:core-ktx:1.7.0"

        • implementation "com.google.android.material:material:1.6.0"

  2. Initialize the SDK on application startup

    • See the com.olo.olopay.bootstrap package for options

    • See the com.olo.olopay.api.OloPayApiInitializer class

  3. Add a payment control to your app

    • See the com.olo.olopay.controls package

    • See the com.olo.olopay.googlepay.GooglePayContext class

  4. Using the IPaymentMethodParams instance from the payment control, create an IPaymentMethod instance via OloPayAPI.createPaymentMethod()

    • See the com.olo.olopay.api package

  5. Submit the IPaymentMethod data to the Basket Submit endpoint of Olo's Ordering API

Packages

com.olo.olopay.api
Link copied to clipboard

The Olo Pay API implementation, which is used for creating an IPaymentMethod instance from user-entered card details

com.olo.olopay.bootstrap
Link copied to clipboard

When the application starts, the Olo Pay SDK needs to be initialized by calling OloPayApiInitializer().setup(). Classes in this package can help with the initialization.

com.olo.olopay.controls
Link copied to clipboard

The Olo Pay SDK provides three controls for capturing card details from a user. They are PCI-compliant and can be added to your application layouts just like any standard View.

com.olo.olopay.controls.callbacks
Link copied to clipboard

Callbacks for responding to user input on the PCI-compliant credit card controls

com.olo.olopay.data
Link copied to clipboard

An assortment of data and enum classes used throughout the Olo Pay SDK

com.olo.olopay.exceptions
Link copied to clipboard

Exceptions that can be thrown while making Olo Pay API calls

com.olo.olopay.googlepay
Link copied to clipboard

Classes for adding Google Pay support to your app.

com.olo.olopay.internal.callbacks
Link copied to clipboard