Additional Params

(Optional Step)

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. Below is list of other parameters that can be passed in additional params.

Parameter

Type

Description

Mandatory

PayUCheckoutProConstants.CP_UDF1

String

User defined field, Merchant can store their customer id, etc

No

PayUCheckoutProConstants.CP_UDF2

String

User defined field, Merchant can store their customer id, etc

No

PayUCheckoutProConstants.CP_UDF3

String

User defined field, Merchant can store their customer id, etc

No

PayUCheckoutProConstants.CP_UDF4

String

User defined field, Merchant can store their customer id, etc

No

PayUCheckoutProConstants.CP_UDF5

String

User defined field, Merchant can store their customer id, etc

No

Static hashes

String

Covered in the Hash Generation section

No

PayUCheckoutProConstants.SODEX_OSOURC_EID

String

Sodexo Source id , Merchant can store it from field 3 of payuresponse

No

HashMap<String, Object> additionalParams = new HashMap<>(); 
additionalParams.put(PayUCheckoutProConstants.CP_UDF1, "udf1"); 
additionalParams.put(PayUCheckoutProConstants.CP_UDF2, "udf2"); 
additionalParams.put(PayUCheckoutProConstants.CP_UDF3, "udf3"); 
additionalParams.put(PayUCheckoutProConstants.CP_UDF4, "udf4"); 
additionalParams.put(PayUCheckoutProConstants.CP_UDF5, "udf5"); 
// to show saved sodexo card
additionalParams.put(PayUCheckoutProConstants.SODEXO_SOURCE_ID, "srcid123"); 
 
PayUPaymentParams.Builder builder = new PayUPaymentParams.Builder(); 
builder.setAmount("1.0") 
        .setIsProduction(true) 
        .setProductInfo("Macbook Pro") 
        .setKey(key) 
        .setPhone(phone) 
        .setTransactionId(String.valueOf(System.currentTimeMillis())) 
        .setFirstName("John") 
        .setEmail("john@yopmail.com") 
        .setSurl("https://payuresponse.firebaseapp.com/success") 
        .setFurl("https://payuresponse.firebaseapp.com/failure") 
        .setUserCredential(key+":john@yopmail.com") 
        .setAdditionalParams(additionalParams); 
PayUPaymentParams payUPaymentParams = builder.build();  

Last updated