Android Kotlin helpers for MakePay checkout flows.
This SDK is intentionally mobile-safe: it does not accept or store MakePay partner API secrets. Android apps should request payment-link creation from their own backend, then use this SDK to open hosted checkout, embedded checkout, donation links, and parse return deep links.
- Android Gradle Plugin
8.13.2 - Kotlin
2.3.21 - Android compile SDK
36 - Minimum SDK
23
The package is planned for Maven Central as:
implementation("io.makepay:makepay-android:0.1.0")Until the first release is published, include the makepay-android module or publish it to your internal Maven registry.
val checkout =MakePayCheckout()
startActivity(checkout.checkoutIntent("pay_123"))Use Custom Tabs:
checkout.launchCheckout(context, "pay_123")Build URLs without launching UI:
val hosted =MakePayCheckoutUrls.hostedPaymentUrl("pay_123")
val embedded =MakePayCheckoutUrls.embeddedPaymentUrl(
paymentUid ="pay_123",
parentOrigin ="https://merchant.example",
)Payment links must be created by a trusted backend with MakePay credentials. The Android app can send a mobile-safe request body to that backend:
val body =MakePayMobileJson.encodePaymentLinkRequest(
MakePayMobilePaymentLinkRequest(
clientReferenceId ="cart_123",
payload =MakePayMobilePaymentLinkPayload(
title ="Order #1042",
amount ="129.99",
currency ="USDT",
customerEmail ="buyer@example.com",
),
),
)Your backend should validate the cart/order server-side, create the MakePay payment link with the partner API, and return the payment UID or hosted checkout URL to the app.
val result =MakePayCheckoutResultParser.parse(intent.data!!)The parser reads common return parameters such as status, paymentUid, and orderId.
gradle --no-daemon testReleaseUnitTest lintRelease assembleReleaseMaintainer: Ethan Carter (makepayio).