SDK Integration
  • Getting Started
  • Onboarding Requirements
  • Hash Generation
  • Test Merchant list
  • Android
    • Android SDK Offering
    • PayUCheckoutPro
      • Integration
      • Build the Payment Params
        • Additional Params
      • Hash Generation
      • Set up the payment hashes
      • Initiate the Payment
      • Customized Integration
        • Set Webview Properties
        • SDK Configuration
        • Additional Offerings
      • Offers Integration
      • Convenience Fee Integration
      • Custom Note Integration
      • MCP Integration
    • Core
      • Supported Payment Types
      • TPV Integration
      • Merchant Web Services
        • Getting Enabled Payment Options
        • GetCheckoutDetails API
        • Lookup API
    • Custom Browser
      • Integration
        • CustomBrowser Config
        • CustomBrowserCallback
        • Supporting below Lollipop Versions
        • Third-Party Payments Support
      • Sample App
      • Change Logs
    • Native OTP Assist
      • Integration
      • Customization
      • Change Logs
    • UPI
      • Integration
      • TPV Integration in UPI
      • Sample App
      • Change Logs
    • Google Pay™
      • Integration
      • Sample App
    • PhonePe
      • Integration
      • Sample App
      • Change Logs
    • OlaMoney
    • PayU OTP Parser
      • Integration
    • FAQ Android
  • iOS
    • PayUCheckoutPro
      • Integration
      • Advanced Integration
      • Set up the payment hashes
      • Convenience Fee Integration
      • MCP Integration
      • Custom Note Integration
    • Core
      • POD Integration
      • Seamless
      • Web Services
      • Objective C-Non-Seamless
      • Standing Instructions
      • TPV Integration
      • Sample App
    • Custom Browser
      • Sample App
    • OlaMoney
    • Native OTP Assist
      • Integration
      • Customization
    • UPI
      • Integration
      • Sample App
    • PayUParams
      • PayUSIParams
      • PayUBeneficiaryParams
  • Releasing to Apple
  • React-Native
    • PayUCheckoutPro
      • Integration
      • Set up the payment hashes
      • Advanced Integration
      • Change Logs
    • Core
    • Non-Seamless Wrapper
    • TPV (beta)
      • Integration
  • FAQ iOS
Powered by GitBook
On this page
  • Step 2: Build the Payment Params
  • For Recurring Payments(SI)
  • Payment Param Definitions

Was this helpful?

  1. Android
  2. PayUCheckoutPro

Build the Payment Params

(Mandatory Step)

Step 2: Build the Payment Params

To initiate a payment, your app will need to send transactional information to the Checkout Pro SDK. To pass this information, build a payment parameter object as below

PayUPaymentParams.Builder builder = new PayUPaymentParams.Builder(); 
builder.setAmount(<String>)  
        .setIsProduction(<Boolean>)  
        .setProductInfo(<String>)   
        .setKey(<String>)      
        .setPhone(<String>)      
        .setTransactionId(<String>)  
        .setFirstName(<String>) 
        .setEmail(<String>) 
        .setSurl(<String>) 
        .setFurl(<String>) 
        .setUserCredential(<String>) 
        .setAdditionalParams(<HashMap<String,Object>>); //Optional, can contain any additional PG params  
PayUPaymentParams payUPaymentParams = builder.build(); 
 val payUPaymentParams = PayUPaymentParams.Builder() 
    .setAmount(<String>)      
    .setIsProduction(<Boolean>)  
    .setKey(<String>)       
    .setProductInfo(<String>)   
    .setPhone(<String>)  
    .setTransactionId(<String>) 
    .setFirstName(<String>) 
    .setEmail(<String>) 
    .setSurl(<String>) 
    .setFurl(<String>) 
    .setUserCredential(<String>) 
    .setAdditionalParams(<HashMap<String,Any?>>) //Optional, can contain any additional PG params 
    .build()  

For Recurring Payments(SI)

If you are integrating SI, then generate below payment params additionally

PayUSIParams siDetails  = new PayUSIParams.Builder()
                .setIsFreeTrial(true) //set it to true for free trial. Default value is false 
                .setBillingAmount("1.0")
                .setBillingCycle(PayUBillingCycle.ONCE)     
                .setBillingCurrency("INR")
                .setBillingInterval(1)
                .setPaymentStartDate("2021-12-24")
                .setPaymentEndDate("2021-12-31")
                .setBillingRule(PayuBillingRule.MAX)
                .setBillingLimit(PayuBillingLimit.ON)
                .setRemarks("SI Txn")
                .build();
val siDetails  = PayUSIParams.Builder()
                .setIsFreeTrial(true) //set it to true for free trial. Default value is false
                .setBillingAmount("1.0")
                .setBillingCycle(PayUBillingCycle.ONCE)     
                .setBillingCurrency("INR")
                .setBillingInterval(1)
                .setPaymentStartDate("2021-12-24")
                .setPaymentEndDate("2021-12-31")
                .setBillingRule(PayuBillingRule.MAX)
                .setBillingLimit(PayuBillingLimit.ON)
                .setRemarks("SI Txn")
                .build()
PayUPaymentParams.Builder builder = new PayUPaymentParams.Builder(); 
builder.setAmount(<String>)  
        .setIsProduction(<Boolean>)  
        .setProductInfo(<String>)   
        .setKey(<String>)      
        .setPhone(<String>)      
        .setTransactionId(<String>)  
        .setFirstName(<String>) 
        .setEmail(<String>) 
        .setSurl(<String>) 
        .setFurl(<String>) 
        .setUserCredential(<String>) 
        .setAdditionalParams(<HashMap<String,Object>>); //Optional, can contain any additional PG params  
        .setPayUSIParams(siDetails);
PayUPaymentParams payUPaymentParams = builder.build(); 
 val payUPaymentParams = PayUPaymentParams.Builder() 
    .setAmount(<String>)      
    .setIsProduction(<Boolean>)  
    .setKey(<String>)       
    .setProductInfo(<String>)   
    .setPhone(<String>)  
    .setTransactionId(<String>) 
    .setFirstName(<String>) 
    .setEmail(<String>) 
    .setSurl(<String>) 
    .setFurl(<String>) 
    .setUserCredential(<String>) 
    .setAdditionalParams(<HashMap<String,Any?>>) //Optional, can contain any additional PG params 
    .setPayUSIParams(siDetails)
    .build()  

Payment Param Definitions

Parameter

Type

Description

Data Type & Validation

Mandatory

Amount

String

Total transaction amount

Can not be null or empty and should be valid double stringified eg, “100.0”

Yes

Product info

String

Information about product

Can not be null or empty

Yes

Key

String

Merchant key received from PayU

Can not be null or empty

Yes

isProduction

Boolean

Environment of SDK. Set to true for Production else false

Should be a Boolean value. Default value is true

No

Phone

String

Customer’s phone number

Should be of 10 digits

No

TransactionId

String

It should be unique for each transaction

Should be unique for each transaction

Yes

First Name

String

Customer’s first name

Can not be null or empty

Yes

Email

String

Customer’s email id

Can not be null or empty

Yes

Surl

String

When the transaction is successful, PayU will load this url and pass transaction response

Can not be null or empty

Yes

Furl

String

When the transaction is a failure, PayU will load this url and pass transaction response

Can not be null or empty

Yes

User Credential

String

This is used for the store card feature. PayU will store cards corresponding to passed user credentials and similarly, user credentials will be used to access previously saved cards

Should be a unique value

Format : <merchantKey>:<userId>

Here,

UserId is any id/email/phone number to uniquely identify the user

No

PayUSIParams

Object of PayUSIParams

This contains SI Details

Object of PayUSIParams

No

Additional parameters are optional parameters such as UDF (user defined fields), static hashes, etc. More details on static hash generation and passing are mentioned in the hash generation section.

PreviousIntegrationNextAdditional Params

Last updated 3 years ago

Was this helpful?

Refer for more details on all params used in PayUSIParams. After creating above PayUSIParams object, set it in the PayUPaymentParams object. For SI, complete PayUPaymentParams looks like below

here