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.bootstrap
package for options -
See the
com.olo.olopay.api.OloPayApiInitializer
class -
Add a payment control to your app
-
See the
com.olo.olopay.controls
package -
See the
com.olo.olopay.googlepay.GooglePayContext
class -
Using the
IPaymentMethodParams
instance from the payment control, create anIPaymentMethod
instance viaOloPayAPI.createPaymentMethod()
-
See the
com.olo.olopay.api
package -
Submit the
IPaymentMethod
data to the Basket Submit endpoint of Olo's Ordering API