search

Payment

 

CreateTxnToken


Returns a token which will be used in further frontend payment calls.

createTxnToken(paymentDetails)
Example
EChannelId channelId = EChannelId.WEB;
String orderId = "UNIQUE_ORDER_ID";
Money txnAmount = new Money(EnumCurrency.INR, "1.00");
UserInfo userInfo = new UserInfo();
userInfo.setCustId("CUSTOMER_ID");
PaymentDetail paymentDetails = new PaymentDetail.PaymentDetailBuilder
                (channelId, orderId, txnAmount, userInfo).build();
SDKResponse<InitiateTransactionResponse> response = Payment.createTxnToken(paymentDetails);
 

GetPaymentStatus


Returns the payment status

getPaymentStatus(paymentStatusDetail)
Example
String orderId = "YOUR_ORDER_ID";
Time readTimeout = new Time(5, TimeUnit.MINUTES);
PaymentStatusDetail paymentStatusDetail = new PaymentStatusDetail.PaymentStatusDetailBuilder(orderId).setReadTimeout(readTimeout).build();
SDKResponse<NativePaymentStatusResponse> response = Payment.getPaymentStatus(paymentStatusDetail);

Refund

 

InitiateRefund


Initiates the Refund

initiateRefund(refundDetail)
Example
String orderId = "UNIQUE_ORDER_ID";
String refId = "REFERENCE_ID";
String txnId = "TRANSACTION_ID";
String txnType = "REFUND";
String refundAmount = "1";
Time readTimeout = new Time(5, TimeUnit.MINUTES);
RefundDetail refundDetail = new RefundDetail.RefundDetailBuilder(orderId, refId, txnId, txnType,refundAmount).setReadTimeout(readTimeout).build();
SDKResponse<AsyncRefundResponse>response = Refund.initiateRefund(refundDetail);
Parameters
ATTRIBUTE DESCRIPTION
RefundDetail Consists of all refund attributes like orderId, refId, txnType, refundAmount, etc.

 

Return type
ATTRIBUTE DESCRIPTION
SDKResponse Consists of AsyncRefundResponse object and raw json response string.

 

GetRefundStatus


Returns the Refund status

getRefundStatus(refundStatusDetail)
Example
String orderId = "ORDER_ID";
String refId = "REFERENCE_ID";
Time readTimeout = new Time(5, TimeUnit.MINUTES);
RefundStatusDetail refundStatusDetail = new RefundStatusDetail.RefundStatusDetailBuilder(orderId, refId)
                    .setReadTimeout(readTimeout).build();
SDKResponse<NativeRefundStatusResponse> response = Refund.getRefundStatus(refundStatusDetail);