Olo Digital Wallets SDK

Welcome to the Olo Digital Wallets Android SDK

The Olo Digital Wallets SDK provides a simple and easy way to add digital wallet (Google Pay) payments to your app.

The primary purpose of the SDK is to facilitate payments with Olo's ordering ecosystem. It should be able to facilitate payments with any processor that accepts Google Pay, but functionality outside of Olo's ordering ecosystem has not been tested and is not guaranteed.

Useful Links:


Setup

The easiest way to get set up with using the Olo Digital Wallets SDK is to add it as a dependency in your build.gradle file, replacing X.Y.Z with the version of the SDK you want to use.

implementation 'com.olo.pay:digitalwallets-android-sdk:X.Y.Z'

Getting Started

The Olo Digital Wallets SDK provides a simple way to get payment data needed for processing payments with Google Pay. This section provides a high-level description of how to use the SDK in your app.

  1. Enable Google Pay in your app manifest in the application tag

     <application>
    ...
    <meta-data
    android:name="com.google.android.gms.wallet.api.enabled"
    android:value="true" />
    </application>

  2. Create a Configuration instance to configure Google Pay payments

  3. Create a GooglePayLauncher instance and provide the configuration from the previous step

  4. Create a Google Pay Button and add it to the app

  5. When the button is clicked, present the Google Pay Sheet using GooglePayLauncher.present()

    Important: If Google Pay isn't ready at the time present() is called, an exception will be thrown.

  6. Retrieve the Result created by GooglePayLauncher

  7. Submit the Result data for payment processing (commonly the Basket Submit endpoint of the Ordering API)


Packages

Link copied to clipboard

Classes representing the main entrypoints for working with the Digital Wallets SDK

Link copied to clipboard

Callback classes for responding to user input on the Google Pay UI controls

Link copied to clipboard

Data and enum classes used throughout the Digital Wallets SDK

Link copied to clipboard

Exceptions that can be thrown while making Google Pay payments