Merchant Web Services

This page describes how to make api calls from SDK.

Initialise MerchantWebService.

Create an object of MerchantWebService with any of the supported api commands.

MerchantWebService merchantWebService = new MerchantWebService();
merchantWebService.setKey(merchantKey); // Merchant key
merchantWebService.setCommand(<Api Commands>); // Command for fetching payment related details
merchantWebService.setVar1(userCredential) // User Credential of the merchant
merchantWebService.setHash(<Api Command Hash>) //Hash for fetching payment related details such as payment options

For web service hash generation visit Hash Generation.

Create Merchant Web Service PostData.

PostData postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams();
if (postData.getCode() == PayuErrors.NO_ERROR) {
payuConfig.setData(postData.getResult());
}

If PostData has no error - you are good to go else please check the data point set in merchantWebService

Apis Commands supported

Below api commands are present in PayUConstants class.

Commands

Description

PAYMENT_RELATED_DETAILS_FOR_MOBILE_SDK

To get all enabled payment options

VAS_FOR_MOBILE_SDK

To get health status of payment options

SAVE_USER_CARD

Save User CC/DC

EDIT_USER_CARD

Edit stored user card

DELETE_USER_CARD

Delete stored user card

GET_USER_CARDS

Get stored user cards

CHECK_IS_DOMESTIC

Get Bin information of CC/DC

GET_TRANSACTION_INFO

Getting Transaction information

VERIFY_PAYMENT

Verify Payment Status

CHECK_PAYMENT

Check Payment Status

CHECK_OFFER_DETAILS

To get the offer details.

API_GET_EMI_AMOUNT_ACCORDING_INTEREST

To get the emi amount according to interest.

CHECK_OFFER_STATUS

To check the status of offe

ELIGIBLE_BINS_FOR_EMI

To check if bin is eligible for EMI