Olo Pay SDK
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:
-
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"
-
Initialize the SDK on application startup
-
See the
com.olo.olopay.bootstrappackage for options -
See the
com.olo.olopay.api.OloPayApiInitializerclass -
Add a payment control to your app
-
See the
com.olo.olopay.controlspackage -
See the
com.olo.olopay.googlepay.GooglePayContextclass -
Using the
IPaymentMethodParamsinstance from the payment control, create anIPaymentMethodinstance viaOloPayAPI.createPaymentMethod() -
See the
com.olo.olopay.apipackage -
Submit the
IPaymentMethoddata to the Basket Submit endpoint of Olo's Ordering API