Skip to main content
Next, we can quickly embed the SDK in your Android app to store card details, authorize payments, and capture a transaction.

Add the SDK

The Android SDK is available as a Maven bundle on Jitpack. In Gradle, this can be set up as follows.

Set up the app

Next, add the following meta information to your app’s manifest.
Replace [ID] with the ID of your instance and [ENVIRONMENT] with either sandbox or production.
Additionally, ensure you have internet access added to the permissions in your manifest.

Prepare the SDK

Next, add the following to the top of your activity where you want to enable the payment sheet.
Then, initialize the SDK within the onCreate() method of your activity.
Next, register the observer as follows.
Finally, implement the Gr4vyResultHandler interface on the activity and implement the required methods.