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 .aar as a dependency in your app's gradle file
-
implementation files('/path/to/aar) -
Add SDK dependencies to your app's gradle file (temporary requirement until Olo Pay is on Maven)
-
implementation "com.stripe:stripe-android:17.2.0" -
implementation "androidx.core:core-ktx:1.6.0" -
implementation "com.google.android.material:material:1.4.0" -
Initialize the SDK on application startup
-
See the
com.olo.olopay.bootstrappackage -
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