NPCI eNACH(For Web/Hybrid Applications)



Register a NPCI eNACH with Checkout JS

Checkout is the best payment flow, on web and mobile. Checkout builds on top of checkout.js to provide your users with a streamlined, mobile-ready payment experience that is constantly improving.

Parameters in P2M Checkout

tr>
Param name Description Datatype Example Mandatory / Conditional / Optional
deviceId This is the identifier for Hash Algorithm that need the used. Hashing algorithm that is supported are - WEBSH1(SHA-256), WEBSH2(SHA-512) Alphanumeric WEBSH2 Mandatory
token In this Pass the Hash value generated.

Hash value will be generated using the below logic by passing the below values in pipe separated to the hashing algorithm passed in deviceId

consumerData.merchantId|consumerData.txnId|totalamount|consumerData.accountNo|consumerData.consumerId|consumerData.consumerMobileNo|consumerData.consumerEmailId |consumerData.debitStartDate|consumerData.debitEndDate|consumerData.maxAmount|consumerData.amountType|consumerData.frequency|consumerData.cardNumber|consumerData. expMonth|consumerData.expYear|consumerData.cvvCode|SALT [Salt will be given by ]

The last SALT will be the Key given by Hashing Algorithm will be MD5 or SHA1 or SHA 2 as sent in the request in deviceId

Note: Token(HASH) should always be generated at server side only and please make sure that SALT will never be exposed.
varchar Mandatory
enableNewWindowFlow This is a new feature included in checkout it only accept boolean values true OR false. If this feature is enabled, then bank page will open in new window. Once transaction gets completed(success/failed) response will be given in provided response handler function.
This flag is most useful for single page applications.
Boolean true optional
returnUrl This is return url of merchant where response will be posted, it may be same page where payment request is initiated or another page where merchant need to capture response Url https://www.merchanturl.com/response/response.htm Mandatory
redirectOnClose This is a optional parameter, kindly pass boolean true OR URL value to redirect on the click of close button.

If value is true OR valid URL format is passed then it automatically redirect with merchant transaction identifier using POST method.
boolean OR url https://www.merchanturl.com/response/response.htm Optional
responseHandler This is a callback function in JS level which can be used to handle PG response in JS level. Alphanumeric handleResponse Mandatory
paymentMode Payment mode (Available options: all OR netBanking), If Bank selection is at end then select all, if bank selection at Merchant end then pass appropriate mode respective to selected option char all Mandatory
customStyle.PRIMARY_COLOR_CODE This is optional parameter where merchant can provide their primary color code so that provided color code theme gets applied in checkout. If value is blank or not provided then checkout default themes will be applied. varchar hexadecimal(e.g. #8e7cc3) or color name Optional
customStyle.SECONDARY_COLOR_CODE This is optional parameter where merchant can provide their secondary color so that provided color theme gets applied in checkout. If value is blank or not provided then checkout default themes will be applied. varchar hexadecimal(e.g. #FFFFFF) or color name Optional
customStyle.BUTTON_COLOR_CODE_1 This is optional parameter where merchant can provide their button background color so that provided background color gets applied for checkout buttons. If value is blank or not provided then provided primary color is applied as button background. varchar hexadecimal(e.g. #674ea7) or color name Optional
customStyle.BUTTON_COLOR_CODE_2 This is optional parameter where merchant can provide their button text color so that provided text color gets applied for checkout buttons. If value is blank or not provided then secondary color is applied as button text color. varchar hexadecimal(e.g. #FFFFFF) or color name Optional
checkoutElement This is the element id where checkout loads on merchant page instead of popup overlay. Element Selector #checkoutElement Optional
merchantLogoUrl An absolute URL pointing to a logo image of merchant which will show on checkout popup. url https://www.merchanturl.com/images/logo.png Optional
merchantMsg Customize message from merchant which will be shown to customer in checkout page Alphanumeric Your information is secured using industry standard encryption Optional
disclaimerMsg Customize disclaimer message from merchant which will be shown to customer in checkout page Alphanumeric Disclaimer : For authentication Rs. 2/- will be charged. Optional
merchantId Merchant identifier to be shared by . Alphanumeric T1234 Mandatory
consumerId Consumer id assigned by merchant, This is required if enableSI or enableExpressPay or payWithSavedInstrument or enableInstrumentRegistration feature is enabled

Consumer Id should be unique for each mandate and each customer. if a request with duplicate customer id is received, the old mandate registered with the same customer Id will get deactivated and new details will be active and the same is applicable mode wise. Consumer code is one of the important and required parameter for subsequent transaction scheduling.
Alphanumeric(maxlength is 20) c9 Conditional
consumerMobileNo Consumer mobile no. capture by merchant. Number 9898121290 Optional
consumerEmailId Consumer email id capture by merchant. Alphanumeric test@test.com Optional
txnId Merchant's unique transaction reference number Alphanumeric m1tr2uyyw1(maxlength is 40) Mandatory
txnType Transaction type (Available options: SALE, AUTH, CAPTURE). In case of AUTH & CAPTURE calls only Cards/UPI modes are supported, so pass appropriate mode in paymentMode.
For CAPTURE request our PG’s transaction id need to be passed in PGtxnId parameter.
Alphanumeric SALE Conditional
txnSubType Set transaction sub type as DEBIT only if transaction type is SALE else keep this field blank. Alphanumeric DEBIT Conditional
items Product details
itemId : This is scheme code - its value will be shared by , Every scheme code will be mapped with a account number at end where merchant will receive payout
amount : Amount of each product in `
comAmt : Commission amount of each item in `.
array [{ 'itemId' : 'test', 'amount' : '5', 'comAmt':'0'}] Mandatory
cartDescription Any additional details can be passed here and same will be provided in response Only a-zA-Z0-9_/&^$#,!:.-@{}~ and whitespace are allowed Test description Optional
bankCode Bank code shared by Number 123 Conditional
accountNo Customer account no required for TPV transaction and NPCI eNACH Number ******1111 Conditional
accountType Customer account type required to register NPCI eNACH only
Available options are as below:
Saving : Saving
Alphabet Saving Conditional
accountHolderName Account holder name required for NPCI eNACH only Alphabets, apostrophe and Dot Customer's name. Conditional
ifscCode Customer bank's IFSC required for NPCI eNACH only Alphanumeric ICIC0000001 Conditional
debitStartDate It’s debit start date(dd-mm-yyyy). Required only for SI Mandate registration. Number with special character allowed "-" 01-09-2016 Conditional
debitEndDate It’s debit end date(dd-mm-yyyy). Required only for SI Mandate registration. Number with special character allowed "-" 01-09-2046 Conditional
maxAmount It’s maximum amount to be debited in `.Required only for SI Mandate registration. Number 200 Conditional
amountType It’s amount type. Required only for SI Mandate registration.
Available options are as below:
M : Variable Amount
F : Fixed Amount
Alphabet M Conditional
frequency Required only for SI Mandate registration.
Available options are as below:
DAIL : Daily
WEEK : Weekly
MNTH : Monthly
QURT : Quarterly
MIAN : Semi annually
YEAR : Yearly
BIMN : Bi- monthly
ADHO : As and when presented
Alphanumeric ADHO Conditional

NPCH eNACH Amount Limit

E NACH

  1. For all the banks – 1 Lac
  2. SIC – Max Card limit

Integration

You can integrate Checkout in as little as client-side code. As we release new Checkout features, we'll automatically roll them out to your existing Checkout integration, so that you will always be using our latest technology without needing to change a thing.

Note:

Having Meta-Viewport tag and jQuery library is recommended before integrating checkout. If you already having a jQuery in your project then there is no need to include our jQuery.

<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1" />
Live URL
<script src="https://www.paynimo.com/paynimocheckout/client/lib/jquery.min.js" type="text/javascript"></script>
  1. Include the following line of code before </body> tag in your HTML.
    Live Checkout JS Link
    <script type="text/javascript" src="https://www.paynimo.com/Paynimocheckout/server/lib/checkout.js"></script>
    							
  2. Initialize Checkout on click of pay button and your HTML code is looks as below,
    EDIT & TRY THIS CODE
    <!doctype html>
    <html>
    
    <head>
    <title>Checkout Demo</title>
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1" / />
    <script src="https://www.paynimo.com/Paynimocheckout/client/lib/jquery.min.js" type="text/javascript"></script>
    </head>
    
    <body>
    
    <button id="btnSubmit">Make a Payment</button>
    
    <script type="text/javascript" src="https://www.paynimo.com/Paynimocheckout/server/lib/checkout.js"></script>
    
    <script type="text/javascript">
    $(document).ready(function() {
        function handleResponse(res) {
            if (typeof res != 'undefined' && typeof res.paymentMethod != 'undefined' && typeof res.paymentMethod.paymentTransaction != 'undefined' && typeof res.paymentMethod.paymentTransaction.statusCode != 'undefined' && res.paymentMethod.paymentTransaction.statusCode == '0300') {
                // success block
            } else if (typeof res != 'undefined' && typeof res.paymentMethod != 'undefined' && typeof res.paymentMethod.paymentTransaction != 'undefined' && typeof res.paymentMethod.paymentTransaction.statusCode != 'undefined' && res.paymentMethod.paymentTransaction.statusCode == '0398') {
                // initiated block
            } else {
                // error block
            }
        };
    
        $(document).off('click', '#btnSubmit').on('click', '#btnSubmit', function(e) {
            e.preventDefault();
    
            var configJson = {
                'tarCall': false,
                'features': {
                    'showPGResponseMsg': true,
                    'enableAbortResponse': true,
                    'enableNewWindowFlow': true,    //for hybrid applications please disable this by passing false
                    'enableExpressPay':true,
                    'siDetailsAtMerchantEnd':true,
                    'enableSI':true
                },
                'consumerData': {
                    'deviceId': 'WEBSH2',	//possible values 'WEBSH1' and 'WEBSH2'
                    'token': '37b0b9dd68cceafdf8dd38142803c0babc7073c3042547dc6060660ba50ac5cd043ddf0a27bdcbddc2cab2a0a28cbf51b30ecc2176e617304745f825655b1ff9',
                    'returnUrl': 'https://pgproxyuat.in.worldline-solutions.com/linuxsimulator/MerchantResponsePage.jsp',    //merchant response page URL
                    'responseHandler': handleResponse,
                    'paymentMode': 'netBanking',
                    'merchantLogoUrl': 'https://www.paynimo.com/CompanyDocs/company-logo-md.png',  //provided merchant logo will be displayed
                    'merchantId': 'L3348',
                    'currency': 'INR',
                    'consumerId': 'c964634',  //Your unique consumer identifier to register a eMandate/eNACH
                    'consumerMobileNo': '9876543210',
                    'consumerEmailId': 'test@test.com',
                    'txnId': '1481197581115',   //Unique merchant transaction ID
                    'items': [{
                        'itemId': 'test',
                        'amount': '5',
                        'comAmt': '0'
                    }],
                    'customStyle': {
                        'PRIMARY_COLOR_CODE': '#3977b7',   //merchant primary color code
                        'SECONDARY_COLOR_CODE': '#FFFFFF',   //provide merchant's suitable color code
                        'BUTTON_COLOR_CODE_1': '#1969bb',   //merchant's button background color code
                        'BUTTON_COLOR_CODE_2': '#FFFFFF'   //provide merchant's suitable color code for button text
                    },
                    //'accountNo': '******1111',    //Pass this if accountNo is captured at merchant side for eMandate/eNACH
                    //'accountHolderName': 'Name',  //Pass this if accountHolderName is captured at merchant side for ICICI eMandate & eNACH registration this is mandatory field, if not passed from merchant Customer need to enter in Checkout UI.
                    //'ifscCode': 'ICIC0000001',        //Pass this if ifscCode is captured at merchant side.
                    'accountType': 'Saving',  //Required for eNACH registration this is mandatory field
                    'debitStartDate': '10-03-2019',
                    'debitEndDate': '01-03-2047',
                    'maxAmount': '100',
                    'amountType': 'M',
                    'frequency': 'ADHO'	//  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
                }
            };
    
            $.pnCheckout(configJson);
            if(configJson.features.enableNewWindowFlow){
                pnCheckoutShared.openNewWindow();
            }
        });
    });
    </script>
    </body>
    
    </html>
    

    Your page output would be as below, to test just click on "Make a Payment" button

  3. You will get below response in pipe(|) separated format

    txn_status|txn_msg|txn_err_msg|clnt_txn_ref|tpsl_bank_cd|tpsl_txn_id|txn_amt|clnt_rqst_meta|tpsl_txn_time|bal_amt|card_id|alias_name|BankTransactionID|mandate_reg_no|token|hash
    Merchant need to take the response and then calculate the hash using the same algorithm used at the time of request and need to pass below formatted response string to the same algorithm to generate a HASH value for Dual verification txn_status|txn_msg|txn_err_msg|clnt_txn_ref|tpsl_bank_cd|tpsl_txn_id|txn_amt|clnt_rqst_meta|tpsl_txn_time|bal_amt|card_id|alias_name|BankTransactionID|mandate_reg_no|token|SALT (Same key used during sending request)
    After calculating HASH value same has to match with HASH value which is provided from in response for dual verification. Once both HASH gets matched merchant can show Success/Failure response to end customer and update their DB
    txn_status value should be 0300 in case of Success, 0398 in case of Initiated, 0399 in case of failure, 0396 in case of Awaited and 0392 in case of Aborted. On the basis of response code you can mark your transaction either Success/Initiated/Failed/Awaited/Aborted.

Configuration Options

Features

Option Description
showLoader It’s true by default, to hide checkout default loader pass this flag value as false.
showPGResponseMsg It’s true by default, which enables the final success/failure messages of checkout.js. If you want to show your own final response messages then set its value to false.
showDownloadReceipt It’s true by default, and shows a download button on response page in checkout overlay for successful transactions. To hide this button in response set its value as false during checkout initialization.
enableExpressPay It’s false by default, to enable saved payment options set its value to true
payDetailsAtMerchantEnd It’s false by default. If Selected Bank code, Account Number are captured from merchant end to register NPCI eNACH then enable this flag by passing value true during checkout initialization in below manner.
var configJson = {
  'tarCall':false,
  'features':{
    'showPGResponseMsg':true,
    'enableNewWindowFlow': true,    //for hybrid applications please disable this by passing false
    'enableExpressPay':true,
    'enableSI':true,
    'payDetailsAtMerchantEnd':true
  },
  'consumerData':{
    'deviceId': 'WEBSH2', //possible values 'WEBSH1' and 'WEBSH2'
    'token': 'ca25c3ecb179f82d06059d693b6ad4ad901671ea09e1bdec318d908cead1ed1eab3ca1265e833f98614ef92691d125d9d6eb92599e900c20eb593e95afbeedc5',
    'returnUrl':'https://www.merchanturl.com/response/response.htm',
    'responseHandler':handleResponse,
    'paymentMode': 'netBanking',
    'merchantLogoUrl': 'https://www.paynimo.com/CompanyDocs/company-logo-md.png',  //provided merchant logo will be displayed
    'merchantId': 'T3239',
    'currency': 'INR',
    'consumerId': 'c9',  //Your unique consumer identifier to register a NPCI eNACH
    'txnId': '1453119527492',   //Unique merchant transaction ID
    'items': [{ 'itemId' : 'test', 'amount' : '5', 'comAmt':'0'}],
    'bankCode': '11640',  //bank code captured from merchant end[bank codelist provided by ]
    'accountNo': '******1111'  //Mandatory to register NPCI eNACH
  }
};

$.pnCheckout(configJson);
if(configJson.features.enableNewWindowFlow){
    pnCheckoutShared.openNewWindow();
}
enableSI It’s false by default, To enable this feature set enableExpressPay and enableSI value to true.
showAllModesWithSI It’s false by default, To enable all payment option with SI set enableExpressPay,enableSI and showAllModesWithSI value to true.
siDetailsAtMerchantEnd It’s false by default, if NPCI eNACH details are captured at merchant side pass enableSI and siDetailsAtMerchantEnd's value as true and provide below mentioned parameters value.
If siDetailsAtMerchantEnd's value is false then the NPCI eNACH details are captured in checkout.

debitStartDate, debitEndDate, maxAmount, amountType , frequency
var configJson = {
  'tarCall':false,
  'features':{
    'showPGResponseMsg':true,
    'enableNewWindowFlow': true,    //for hybrid applications please disable this by passing false
    'enableExpressPay':true,
    'enableSI':true,
    'payDetailsAtMerchantEnd':true,
    'siDetailsAtMerchantEnd':true
  },
  'consumerData':{
    'deviceId': 'WEBSH2', //possible values 'WEBSH1' and 'WEBSH2'
    'token': 'ca25c3ecb179f82d06059d693b6ad4ad901671ea09e1bdec318d908cead1ed1eab3ca1265e833f98614ef92691d125d9d6eb92599e900c20eb593e95afbeedc5',
    'returnUrl':'https://www.merchanturl.com/response/response.htm',
    'responseHandler':handleResponse,
    'paymentMode': 'netBanking',
    'merchantLogoUrl': 'https://www.paynimo.com/CompanyDocs/company-logo-md.png',  //provided merchant logo will be displayed
    'merchantId': 'T3239',
    'currency': 'INR',
    'consumerId': 'c9',  //Your unique consumer identifier to register a NPCI eNACH
    'txnId': '1453119527492',   //Unique merchant transaction ID
    'items': [{ 'itemId' : 'test', 'amount' : '5', 'comAmt':'0'}],
    'bankCode': '11640',  //bank code captured from merchant end[bank codelist provided by ]
    'accountNo': '******1111',  //Mandatory to register NPCI eNACH
    'debitStartDate': '01-01-2016',
    'debitEndDate': '01-01-2046',
    'maxAmount': '100',
    'amountType': 'M',
    'frequency': 'MNTH' //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
  }
};

$.pnCheckout(configJson);
if(configJson.features.enableNewWindowFlow){
    pnCheckoutShared.openNewWindow();
}
hideSIDetails It’s false by default, To enable this feature set hideSIDetails and siDetailsAtMerchantEnd value to true. If this flag is enabled and all NPCI eNACH details provided from merchant end then mandate details are not visible to customer(except account number) in checkout.
enableDebitDay It’s false by default, to accept debit day value during NPCI eNACH registration merchant need to enable this feature during checkout initialization.
expandSIDetails It’s false by default, after enabling this feature checkout shows NPCI eNACH details in expanded mode by default.
hideSIConfirmation It’s false by default, if NPCI eNACH details captures from merchant end then checkout shows confirmation screen to end customer before NPCI eNACH registration. To hide this confirmation screen in NPCI eNACH registration pass this flag value as true.
showSIResponseMsg It’s false by default, this flag is enabled checkout shows NPCI eNACH registrations details also in final checkout response on return page.

Available parameters and their default values

var configJson = {
  'tarCall':false,
  'features':{
    'showLoader': true,
    'showPGResponseMsg': true,
    'enableAbortResponse': true,
    'showDownloadReceipt': true,
    'enableNewWindowFlow': false,
    'payDetailsAtMerchantEnd':false,
    'payWithSavedInstrument': false,
    'enableExpressPay': false,
    'enableSI': false,
    'siDetailsAtMerchantEnd': false,
    'hideSIConfirmation': false,
    'expandSIDetails': false,
    'enableDebitDay': false,
    'showSIResponseMsg': false
  },
  'consumerData':{
    'deviceId':'web',
    'authKey':'123abc123',
    'token':'',
    'returnUrl':'',
    'payOptionsHandler':'',
    'responseHandler':'',
    'responseStr':'',
    'paymentMode': 'all',
    'checkoutElement': '',
    'merchantLogoUrl': '',
    'merchantMsg': '',
    'disclaimerMsg': '',
    'siLabelText': '',
    'merchantId': '',
    'consumerId': '',
    'consumerMobileNo': '',
    'consumerEmailId': '',
    'txnId': '',
    'txnType': 'SALE',
    'txnSubType': 'DEBIT',
    'items': [],
    'cartDescription': '',
    'bankCode':'',
    'accountNo': '',
    'accountType': '',
    'accountHolderName': '',
    'ifscCode': '',
    'debitStartDate':'',
    'debitEndDate':'',
    'debitDay':'',
    'maxAmount':'',
    'amountType':'',
    'frequency':''
  }
};