Android SDK
Introduction
The UPITranzact Android SDK enables seamless UPI payment processing for merchants. This documentation will guide you through the installation and implementation of the SDK in your Android application.
Installation
To integrate the UPITranzact SDK into your Android project, add the following dependency in your build.gradle file:
Initialization
Before starting a payment, initialize the SDK with your credentials:
PUBLIC_KEY
: Your public key provided by UPITranzact.SECRET_KEY
: Your secret key for authentication.MERCHANT_ID
: Your unique merchant identifier.
Starting a Payment
To initiate a UPI transaction, use the startPayment
method:
Parameters
AMOUNT
: The payment amount.ORDER_ID
: A unique order identifier generated by your app.CUSTOMER_NAME
: The name of the customer making the payment.CUSTOMER_EMAIL
: The customer's email address.CUSTOMER_NUMBER
: The customer's contact number.PaymentCallback
: Handles success and failure responses.
Payment Callback
Implement the PaymentCallback
interface to handle payment responses:
onPaymentSuccess(String order_id, String message)
: Called when the payment is successful.onPaymentFailed(String order_id, String message)
: Called when the payment fails.
Logging and Debugging
For debugging failed transactions, use:
This helps in tracking payment issues by logging the failure message and order ID.
Support
For any issues or support, please contact UPITranzact Support.
Last updated