💻Developer Docs

Deep-dive into functions and callback references.

OneUpiPayment.Builder builder =
        new OneUpiPayment.Builder(this)
        .with(paymentApp) 
        .setPayeeVpa("oneupiexample@ybl") 
        .setPayeeName("paymentSetting.getUpiMessage()") 
        .setTransactionId(transactionId)
        .setTransactionRefId(transactionId) 
        .setPayeeMerchantCode("d8b567cd-5f41-465f-b9b0-d47f392c4029") 
        .setDescription("planName")
        .setAmount("1000.00"); 
FunctionDatatypeDescription

with()

PaytmentApp Object

This function takes the argument of Payment object

setPayeeVpa()

String

This function takes the argument as UPI ID of the reciever

setPayeeName()

String

This function takes the argument as name of the payee

setTransactionId()

String

This function takes the argument as transaction Id for the payment which is unique to each payment

setTransactionRefId()

String

This function takes the argument as transcation reference ID

setPayeeMerchantCode()

String

This function takes the argument as merchant code which is to be generated via OneUPI web portal

setDescription()

String

This function takes the argument as description of the payment

setAmount()

Decimal OR String

This function takes the argument as amount of the payment

You can create multiple "PaymentApp" object for various payment app available on user's device.

  • PaymentApp paymentApp = PaymentApp.ALL,

  • PaymentApp paymentApp = PaymentApp.AMAZON_PAY,

  • PaymentApp paymentApp = PaymentApp.BHIM_UPI,

  • PaymentApp paymentApp = PaymentApp.GOOGLE_PAY,

  • PaymentApp paymentApp = PaymentApp.PAYTM,

  • PaymentApp paymentApp = PaymentApp.PHONE_PE;

Callbacks

onTransactionCancelled — when a transaction is cancelled by the user

onTransactionSuccess — when a transaction is successful

onTransactionSubmitted — when a transaction is submitted but yet to resolve

onTransactionFailed — when a transaction is failed

Last updated