This repository provides a working example of how to integrate the Tamara Android SDK into an Android application. The example demonstrates key functionalities and serves as a reference for developers using the Tamara SDK.
- Example integration of the Tamara Android SDK.
- Demonstrates payment processing and other core features.
- Configurable environment for testing.
- Android Studio: Version 2022.1.1 or higher.
- Minimum Android SDK Version: 21 (Android 5.0 Lollipop).
- Target Android SDK Version: 34.
- Download the project as a ZIP file from the provided link or GitHub repository.
- Extract the ZIP file to a local directory.
- Launch Android Studio.
- Open the project directory.
- Let Gradle sync automatically.
- Open
AppConst.ktlocated in thesrc/main/java/com/yourpackage/directory. - Update the following fields with your actual credentials:
object AppConst {
const val AUTH_TOKEN = "your-auth-token" // Replace with your API Token
const val API_URL = "https://api-sandbox.tamara.co" // Replace with the API URL for sandbox or production
const val PUBLIC_KEY = "your-public-key" // Replace with your Public Key
const val NOTIFICATION_WEB_HOOK_URL = "https://your-webhook-url.com" // Replace with your webhook URL
const val NOTIFICATION_TOKEN = "your-notification-token" // Replace with your notification token
}The build.gradle file specifies the Tamara SDK version being used. If needed, update the following line in build.gradle to use the desired version:
implementation "co.tamara.merchant:android-sdk:1.1.0"Note: Ensure you use the latest compatible version of the Tamara SDK for your app.
- Connect a physical Android device or start an emulator.
- Click the Run button in Android Studio to install and test the app.
├── README.md # Documentation file
├── build.gradle # Project-level Gradle configuration
├── app/
│ ├── src/ # Application source code
│ ├── build/ # Build output directory (ignored)
│ ├── google-services.json # Firebase configuration (ignored)
│ ├── proguard-rules.pro # ProGuard rules for release builds
├── gradlew # Gradle wrapper script
├── tamara-example.jks # Keystore file (ignored)
- Navigate through the app to understand the integration flow.
- Refer to
MainActivity.ktfor implementation details of the Tamara SDK. - Experiment with different configurations in
AppConst.ktto adapt the app to your environment.
- Do not hardcode sensitive credentials (e.g.,
AUTH_TOKEN,PUBLIC_KEY) in production apps. This example is for testing purposes only. - Use secure methods, such as encrypted storage or server-side configurations, for production environments.
- You can check all the supported functions here: Functions
For issues or questions about the Tamara SDK, contact Tamara Integration Support at integrations@tamara.co