Prerequisites
Before installing the SDK, ensure you have:- Android Studio (latest stable version recommended)
- An Android project with minimum SDK version 23 (Android 6.0)
- A PayMaya account with API keys (sign up here)
Installation Steps
Add JitPack Repository
Open your project’s root
build.gradle file and add the JitPack repository to the allprojects section:build.gradle
If you’re using newer Android projects with
settings.gradle, add the repository there instead:settings.gradle
Add SDK Dependency
Open your app module’s
build.gradle file and add the PayMaya SDK dependency:build.gradle (app module)
Check JitPack releases for the latest version number.
Version Tags
The PayMaya Android SDK follows semantic versioning. Use the release tags from the GitHub repository:JCenter Deprecation Notice
Important: JCenter support has been deprecated. Only versions 2.0.1 and below are available in JCenter as read-only.
ProGuard Configuration
If you’re using ProGuard or R8 for code obfuscation, the SDK is already configured with consumer ProGuard rules. No additional configuration is needed.Troubleshooting
Gradle Sync Issues
If you encounter Gradle sync errors:- Check your internet connection - JitPack downloads dependencies from GitHub
- Clear Gradle cache:
- Verify repository URL - Ensure
https://jitpack.iois correctly added - Check version tag - Verify the version exists on JitPack
Minimum SDK Version Conflict
If you see a minimum SDK version error:build.gradle (app module)
Dependency Conflicts
If you encounter dependency conflicts with other libraries:Next Steps
Now that you have the SDK installed, you’re ready to integrate payments:Quick Start Guide
Learn how to process your first payment