Skip to main content

PayMaya Android SDK

Integrate secure payment solutions into your Android app with Checkout, Pay With PayMaya, and Payment Vault features

PayMaya SDK

Quick start

Get up and running with PayMaya Android SDK in minutes

1

Add the dependency

Add the PayMaya SDK to your app’s build.gradle file:
Gradle
repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.paymaya:paymaya-android-sdk-v2:2.0.0'
}
2

Initialize the SDK

Build a client with your API key and environment:
Kotlin
val payMayaCheckoutClient = PayMayaCheckout.newBuilder()
    .clientPublicKey("pk-your-public-key-here")
    .environment(PayMayaEnvironment.SANDBOX)
    .logLevel(LogLevel.ERROR)
    .build()
Use PayMayaEnvironment.SANDBOX for testing and PayMayaEnvironment.PRODUCTION for live transactions
3

Process a payment

Create a checkout request and start the payment flow:
Kotlin
val request = CheckoutRequest(
    totalAmount = TotalAmount(
        value = BigDecimal("100.00"),
        currency = "PHP"
    ),
    buyer = null,
    items = listOf(
        Item(
            name = "Test Item",
            quantity = 1,
            amount = ItemAmount(
                value = BigDecimal("100.00")
            )
        )
    ),
    requestReferenceNumber = "ORDER-${System.currentTimeMillis()}",
    redirectUrl = RedirectUrl(
        success = "yourapp://payment/success",
        failure = "yourapp://payment/failure",
        cancel = "yourapp://payment/cancel"
    )
)

payMayaCheckoutClient.startCheckoutActivityForResult(this, request)

Payment methods

Choose the payment integration that fits your use case

Checkout

Complete payment flow with buyer information, items, and hosted checkout page

Pay With PayMaya

Single payments and wallet link creation for recurring payments

Payment Vault

Tokenize customer cards for secure storage and future payments

Explore the SDK

Everything you need to integrate payment processing

Environment Setup

Configure sandbox and production environments

Result Handling

Handle payment results and callbacks in your app

Payment Status

Check and verify payment status programmatically

Testing Guide

Test cards and sandbox environment usage

Ready to start building?

Follow our quickstart guide to integrate PayMaya payments into your Android app

View Quickstart