Get Bank List API

Fetch the list of banks for an EMI transaction by passing the handler and amount parameters with this method.

Method: POST

Request parameters

ParameterDescriptionExample
Handler object
mandatory
handlerCreate a handler inner class. This class will return response message.handler
Amount

mandatory
stringEMI The transaction amount.2500

Sample request

initialization = new PaymentInitialization(getApplicationContext());
initialization.getEMIBankList(handler, amount);

Response paramters

ParameterDescription
AcquirerBanksobject List of Available bank names and minimum transaction amount.Refer to AcquirerBanks payload objects.
AmountstringThe transaction amount.2500

Sample response

Use this code to fetch the response of this API.

@SuppressLint("HandlerLeak")
private final Handler handler = new Handler() {
@SuppressWarnings("unchecked")
public void handleMessage(android.os.Message msg) {
if (msg.what == SUCCESS) {
acquirerBanks = new AcquirerBanks();
acquirerBanks = (AcquirerBanks) msg.obj;
emiDetails = new ArrayList<EMI>();
emiDetails = acquirerBanks.getEmiDetails();
if (emiDetails != null && emiDetails.size() > 0) {
AcquirerBanksListAdapter adapter = new
AcquirerBanksListAdapter(EmiPayment.this,
R.layout.custom_spinner, emiDetails);
EmispinnerSelectProvider.setAdapter(adapter);
}
}i
f (msg.what == FAIL) {
Toast.makeText(getApplicationContext(), msg.obj.toString(),
Toast.LENGTH_LONG).show();
}
};
};