www.paynimo.com Open in urlscan Pro
103.211.197.35  Public Scan

Submitted URL: https://www.paynimo.com/paynimocheckout/docs/#regEmandate
Effective URL: https://www.paynimo.com/paynimocheckout/docs/
Submission: On December 21 via api from IN — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

☰ Menu


DOCUMENTATION

Payment Gateway Doc
 * Online Transaction
 * Dual Verification
 * Offline Verification
   

eMandate/eNACH/eSign(AADHAAR based mandate)
 * Mandate Registration
 * Mandate Verification
 * Transaction Scheduling
 * Transaction Verification

UPI Mandate
 * Mandate Registration
 * Mandate Verification
 * Transaction Scheduling
 * Transaction Verification

SI on Cards
 * Mandate Registration
 * Mandate Verification
 * Transaction Scheduling
 * Transaction Verification
 * Mandate Deactivation
 * Stop Payment

Bank Performance Indicator
 * Web
 * Android
 * iOS


SEAMLESS PAYMENT WITH WORLDLINE CHECKOUT

Checkout is the best payment flow, on web and mobile. Checkout provides your
users with a streamlined, mobile-ready payment experience that is constantly
improving.


PARAMETERS IN CHECKOUT

Param name Description Datatype Example Mandatory / Conditional / Optional
deviceId This is the identifier for Hash Algorithm that need the used. Supported
deviceIdentifiers & algorithms are - WEBSH1(SHA-256 algorithm), WEBSH2(SHA-512
algorithm) Alphanumeric WEBSH2 Mandatory deviceId This is the identifier for
Hash Algorithm that need the used. Supported deviceIdentifiers & algorithms are
- ANDROIDSH1(SHA-256 algorithm), ANDROIDSH2(SHA-512 algorithm) Alphanumeric
ANDROIDSH2 Mandatory deviceId This is the identifier for Hash Algorithm that
need the used. Supported deviceIdentifiers & algorithms are - iOSSH1(SHA-256
algorithm), iOSSH2(SHA-512 algorithm) Alphanumeric iOSSH2 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 Worldline]

The last SALT will be the Key given by Worldline Hashing Algorithm will be 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
0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9
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.jsp
Mandatory(if enableNewWindowFlow is not enabled) 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.jsp 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, cards, netBanking, UPI, wallets, cashCards, NEFTRTGS, emiBanks,
BNPLBanks, cardlessEMIBanks and MVISA(for Scan & Pay)), If Bank selection is at
Worldline end then select all, if bank selection at Merchant end then pass
appropriate mode respective to selected option char all Mandatory
paymentModeOrder Merchant can define their payment mode order (Available
options: cards, netBanking, wallets, cashCards, UPI, MVISA, debitPin, NEFTRTGS,
emiBanks, BNPLBanks, cardlessEMIBanks and MVISA(for Scan & Pay)) Array ["cards",
"netBanking", "wallets", "cashCards", "UPI", "MVISA", "debitPin", "emiBanks",
"NEFTRTGS"] Optional 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 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
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 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 currency Transaction currency.
Click here to get list of available currency Alphabets INR Mandatory merchantId
Merchant identifier to be shared by Worldline Alphanumeric T1234 Mandatory
consumerId Consumer id assigned by merchant, This is required if enableSI or
enableExpressPay or payWithSavedInstrument or enableInstrumentRegistration
feature is enabled 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 Worldline, Every
scheme code will be mapped with a account number at Worldline end where merchant
will receive payout
amount : Amount of each product in `
comAmt : Commission amount of each item in `.
array [{ "itemId" : "first", "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 cardScheme Only provided cardScheme will be allowed.
If key is not passed/blank string/blank array then all card schemes are allowed
Valid supported schemes are "visa", "master", "maestro", "rupay", "amex",
"diners". array ["visa", "master", "rupay"] Conditional cardSubType Only
provided Credit or Debit cards will be allowed. If key is not passed/blank
string then all card types are allowed
Valid supported schemes are "credit" or "debit". string credit Conditional
cardNumber Card no entered by user to perform card transaction. Number
4111********1111 Conditional expMonth Expiry Month entered by user to perform
card transaction. Number 09 Conditional expYear Expiry year entered by user to
perform card transaction. Number 2022 Conditional cvvCode CVV code entered by
user to perform card transaction. Number 123 Conditional nameOnCard Name entered
by user to perform card transaction. Alphanumeric test user Conditional
saveInstrument To vault instrument set true else set it false Boolean false
Conditional bankCode Bank code shared by Worldline Number 123 Conditional
accountNo Customer account no required for TPV transaction Number ******1111
Conditional instrumentId If payment mode is cards or UPI then use instrument
token of registered instrument shared by Worldline Number 1234 Conditional


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" />

jQuery library 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.
    
    Checkout 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 SAVE & RUN 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">Proceed to Pay</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 reqJson = {
                        "features": {
                            "enableAbortResponse": true,
                            "enableExpressPay": true,
                            "enableInstrumentDeRegistration" : true,
                            "enableMerTxnDetails": true,
                            "enableNewWindowFlow": true    //for hybrid applications please disable this by passing false
                        },
                        "consumerData": {
                            "deviceId": "WEBSH2",    //possible values "WEBSH1" or "WEBSH2"
                            "token": "c8ac68943de7e7a0300515e5902ce98a1edd9e1e9da94625d43bb70fd8a667d1f0ed4b53161d5bca6a33c3bfed5661c1f44986a94b1d8647601988727999f189",
                            "returnUrl": "https://pgproxyuat.in.worldline-solutions.com/linuxsimulator/MerchantResponsePage.jsp",    //merchant response page URL
                            "responseHandler": handleResponse,
                            "paymentMode": "all",
                            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
                            "merchantId": "L3348",
                            "currency": "INR",
                            "consumerId": "c964634",
                            "consumerMobileNo": "9876543210",
                            "consumerEmailId": "test@test.com",
                            "txnId": "1703166429878",   //Unique merchant transaction ID
                            "items": [{
                                "itemId": "first",
                                "amount": "10",
                                "comAmt": "0"
                            }],
                            "customStyle": {
                                "PRIMARY_COLOR_CODE": "#45beaa",   //merchant primary color code
                                "SECONDARY_COLOR_CODE": "#FFFFFF",   //provide merchant's suitable color code
                                "BUTTON_COLOR_CODE_1": "#2d8c8c",   //merchant's button background color code
                                "BUTTON_COLOR_CODE_2": "#FFFFFF"   //provide merchant's suitable color code for button text
                            }
                        }
                    };
    
                    $.pnCheckout(reqJson);
                    if(reqJson.features.enableNewWindowFlow){
                        pnCheckoutShared.openNewWindow();
                    }
                });
            });
        </script>
    </body>
    
    </html>
    
    LIVE CODE PREVIEW

 3. We will send response using post method in msg key on provided returnUrl.
    You need to capture msg key’s value which will be in pipe(|) separated
    format as mentioned below:
    
    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 checkout initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.


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.

Following is the initial requirement to integrate Checkout SDK in your Android
application:

Minimum Required SDK API 21(Lollipop Version) Target SDK API 33(Android13)
Compiled With API 33(Android13)

 1. Download weipl_checkout aar file into module’s libs folder:
    
    weipl_checkout.aar

 2. Include below lines in dependencies section of module’s build.gradle file:
    
    implementation "androidx.appcompat:appcompat:1.4.2"
    implementation "androidx.constraintlayout:constraintlayout:2.1.2"
    implementation "com.android.volley:volley:1.2.1"
                   
    implementation files("libs/weipl_checkout.aar")

 3. Import WLCheckoutActivity as follows to invoke Checkout
    
    import com.weipl.checkout.WLCheckoutActivity;
    

 4. You have to call preloadData() method and set listener in calling activity’s
    onCreate() method so that SDKs dependecy files will be preloaded & available
    at the time of checkout.
    
    WLCheckoutActivity.setPaymentResponseListener(this);
    WLCheckoutActivity.preloadData(applicationContext);

 5. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    JSONObject reqJson = new JSONObject();
    
    JSONObject jsonFeatures = new JSONObject();
    jsonFeatures.put("enableExpressPay", true);
    jsonFeatures.put("enableInstrumentDeRegistration", true);
    jsonFeatures.put("enableAbortResponse", true);
    jsonFeatures.put("enableMerTxnDetails", true);
    reqJson.put("features", jsonFeatures);
    
    JSONObject jsonConsumerData = new JSONObject();
    jsonConsumerData.put("deviceId", "AndroidSH2");        //possible values "AndroidSH1" or "AndroidSH2"
    jsonConsumerData.put("token", "0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9");
    jsonConsumerData.put("paymentMode", "all");
    jsonConsumerData.put("merchantLogoUrl","https://www.paynimo.com/CompanyDocs/company-logo-vertical.png");
    jsonConsumerData.put("merchantId","L3348");
    jsonConsumerData.put("currency","INR");
    jsonConsumerData.put("consumerId","c964634");
    jsonConsumerData.put("consumerMobileNo","9876543210");
    jsonConsumerData.put("consumerEmailId","test@test.com");
    jsonConsumerData.put("txnId", "1667804027874");
    JSONArray jArrayItems = new JSONArray();
    JSONObject jsonItem1 = new JSONObject();
    jsonItem1.put("itemId", "first");
    jsonItem1.put("amount", "10");
    jsonItem1.put("comAmt", "0");
    jArrayItems.put(jsonItem1);
    jsonConsumerData.put("items", jArrayItems);
    JSONObject jsonCustomStyle = new JSONObject();
    jsonCustomStyle.put("PRIMARY_COLOR_CODE", "#45beaa");
    jsonCustomStyle.put("SECONDARY_COLOR_CODE", "#ffffff");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_1", "#2d8c8c");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_2", "#ffffff");
    jsonConsumerData.put("customStyle",jsonCustomStyle);
    
    reqJson.put("consumerData", jsonConsumerData);
    
    WLCheckoutActivity.open(currentContext, reqJson);    //currentContext will be current activity context

 6. Getting response Back from WLCheckoutActivity in merchant's Activity
    
    @override 
    public void wlCheckoutPaymentResponse(JSONObject response) {
        Log.d("In wlCheckoutPaymentResponse()", response.toString());
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @override 
    public void wlCheckoutPaymentError(JSONObject response) {
        Log.d("In wlCheckoutPaymentError()", response.toString());
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.


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.

 1. import checkout SDK class
    
    import weipl_checkout

 2. Declare WLCheckout Class variable:
    
    var WLCheckout : WLCheckoutViewController?

 3. You have to call preloadData() inside viewDidLoad() method so that SDKs
    dependecy files will be preloaded & available at the time of checkout.
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentResponse(result:)), name: Notification.Name("wlCheckoutPaymentResponse"), object: nil)
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentError(result:)), name: Notification.Name("wlCheckoutPaymentError"), object: nil)
    
    WLCheckout = WLCheckoutViewController()
    WLCheckout?.preloadData()

 4. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    let reqJson : [String:Any] = [
        "features" : [
            "enableAbortResponse": true,
            "enableExpressPay": true,
            "enableInstrumentDeRegistration": true,
            "enableMerTxnDetails": true
        ],
        "consumerData": [
            "deviceId": "iOSSH2",    //possible values "iOSSH1" or "iOSSH2"
            "token": "0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9",
            "paymentMode": "all",
            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
            "merchantId": "L3348",
            "currency": "INR",
            "consumerId": "c964634",
            "consumerMobileNo": "9876543210",
            "consumerEmailId": "test@test.com",
            "txnId": "1665386045734",   //Unique merchant transaction ID
            "items": [[
                "itemId": "first",
                "amount": "10",
                "comAmt": "0"
            ]],
            "customStyle": [
                "PRIMARY_COLOR_CODE": "#45beaa",    // RGB and Hex and RGB supported parameter
                "SECONDARY_COLOR_CODE": "#ffffff",
                "BUTTON_COLOR_CODE_1": "#2d8c8c",
                "BUTTON_COLOR_CODE_2": "#ffffff",
            ]
        ]
    ]
    
    do {
       let jSONObject = String(data: try JSONSerialization.data(withJSONObject: reqJson, options: .prettyPrinted), encoding: String.Encoding(rawValue: NSUTF8StringEncoding))
       WLCheckout!.open(requestObj: jSONObject!)
       DispatchQueue.main.async{
          self.present(self.WLCheckout!, animated: true, completion: nil)
       }
    } catch _ as NSError {
       
    }

 5. Getting response Back from WLCheckoutViewController in merchant's
    ViewController
    
    @objc func wlCheckoutPaymentResponse(result: Notification) {
        print("\(result.object!)")
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @objc func wlCheckoutPaymentError(result: Notification) {
        print("\(result.object!)")
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.

 6. Plist specific changes
    
    Add required UPI intent calling and process data in background permissions
    in plist file
    
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>phonepe</string>
        <string>gpay</string>
        <string>paytm</string>
    </array>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>processing</string>
    </array>
    
    

Xcode Setup

 1. Set Minimum Target version : 12.0
 2. Direct Integration Setup
    * Download latest release of weipl_checkout.xcframework.zip & drag
      .xcframework in "Framework, libraries, and Embedded content" and set
      "Embed & Sign" option.
 3. For CocoaPod Setup
    * Visit CocoaPod for our SDK installation in your project.
 4. For Swift Package Manager Setup
    * To add weipl_checkout package dependency to your Xcode project, select
      File > Swift Packages > Add Package Dependency and enter
      https://github.com/Worldline-ePayments-India/weipl-checkout-ios.git.
    * You can also navigate to your target's General pane, and in the
      "Frameworks, Libraries, and Embedded Content" section, click the + button,
      select Add Other, and choose Add Package Dependency.

--------------------------------------------------------------------------------


CONFIGURATION OPTIONS

Note: All features and provided options are needs to be added in existing
request options as per your features need.

Option Description 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
hideSavedInstruments It’s false by default, after enabling this feature checkout
hides saved payment options even in case of enableExpressPay is enabled.
separateCardMode It’s false by default, if this feature is enabled checkout
shows two separate payment mode(Credit Card & Debit Card).
payDetailsAtMerchantEnd It’s false by default, if bank details/card
details/payment details are captured at merchant end then pass this flags value
true and provide saved instrument details or captured details for respective
payment mode (netBanking, cards, cashCards, emiBanks, NEFTRTGS and wallets) to
checkout.


IF PAYMENT MODE IS CASHCARDS, EMIBANKS, NETBANKING, WALLETS, MVISA, NEFTRTGS
BELOW PARAMETER IS REQUIRED

bankCode: Bank code list provided by Worldline
accountNo : This is optional parameter for netBanking payment mode only, if
enableSI is enabled and account number is blank then account number need to be
enter in next step of checkout.js else it will redirect to bank page


{
    "features": {
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "netBanking",  // available payment modes cashCards, emiBanks, netBanking, wallets, MVISA, NEFTRTGS
        "bankCode": "470",  //bank code list provided by 
        "accountNo": "******1111",  //optional
        "ifscCode": ""  //optional
    }
}

IF PAYMENT MODE IS UPI THEN BELOW PARAMETERS ARE REQUIRED

bankCode: Bank code list provided by Worldline
vpa : This is required if VPA(UPI) is captured at merchant end


{
    "features": {
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "UPI",
        "bankCode": "11800",,  //Optional, bank code list provided by 
        "vpa": "username@bank"    //optional
    }
}

IF PAYMENT MODE IS CARDS BELOW PARAMETERS ARE REQUIRED FOR NEW CARD

cardNumber, expMonth, expYear, cvvCode, nameOnCard, saveInstrument


{
    "features": {
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "cards",
        "cardNumber": "4111********1111",
        "expMonth": "09",
        "expYear": "2023",
        "cvvCode": "123",
        "nameOnCard": "test user",
        "saveInstrument": false
    }
}

IF MERCHANT IS PCI DSS COMPLIANT AND PASSING CVV VALUE FROM THEIR END PLEASE
PASS BELOW PARAMETER’S VALUE AS TRUE IN FEATURES SECTION
AUTHDETAILSATMERCHANTEND

GETTING UPI APPS LIST FOR INTENT FLOW

You have to call below method to get the UPI Apps list(UPI apps installed in
device where app is running). Here, response will be of UPIIntentResponse
object.

JSONArray appsList = WLCheckoutActivity.getUPIResponse(applicationContext);

Here, pass application context. This is mandatory.

In appsList, you will get JSONArray from wherein you can get each application’s
name, package name, base64 string of app icon and then you can display the apps
list as per your convenience(filtration can be done at your end). Later from
user selection, you can pass selected package name along with bank code(which is
set by setPaymentMethodToken() method).

payWithSavedInstrument It’s false by default. To enable this feature set
payWithSavedInstrument and payDetailsAtMerchantEnd value to trueprovide below
parameter details


IF PAYMENT MODE IS CARDS OR UPI BELOW PARAMETERS ARE REQUIRED FOR SAVED
INSTRUMENT

instrumentId, instrumentAlias, instrumentNumber


{
    "features": {
      "enableExpressPay": true,
      "payDetailsAtMerchantEnd": true,
      "payWithSavedInstrument": true
    },
    "consumerData": {
      "paymentMode": "cards", // OR "UPI"
      "consumerId": "c964634",  //Your consumer identifier
      "instrumentId": "1234"
    }
}

enableExpressPay It’s false by default, to enable saved payment options set its
value to true enableInstrumentDeRegistration It’s false by default, To enable
this feature set enableExpressPay and enableInstrumentDeRegistration value to
true

{
    "features": {
        "enableExpressPay": true,
        "enableInstrumentDeRegistration": true
    },
    "consumerData": {
        "consumerId": "c964634",  //Your consumer identifier
    }
}


AVAILABLE PARAMETERS AND THEIR DEFAULT VALUES

{
    "features": {
        "showLoader": true,
        "showPGResponseMsg": true,
        "enableAbortResponse": true,
        "showDownloadReceipt": true,
        "enableNewWindowFlow": false,
        "payDetailsAtMerchantEnd": false,
        "payWithSavedInstrument": false,
        "enableExpressPay": false,
        "hideSavedInstruments": false,
        "enableInstrumentDeRegistration": false,
        "separateCardMode": false
    },
    "consumerData": {
        "deviceId": "WEBSH2",
        "token": "",
        "returnUrl": "",
        "payOptionsHandler": "",
        "responseHandler": "",
        "responseStr": "",
        "paymentMode": "all",
        "paymentModeOrder": [],
        "checkoutElement": "",
        "merchantLogoUrl": "",
        "merchantMsg": "",
        "disclaimerMsg": "",
        "siLabelText": "",
        "merchantId": "",
        "consumerId": "",
        "consumerMobileNo": "",
        "consumerEmailId": "",
        "txnId": "",
        "txnType": "SALE",
        "txnSubType": "DEBIT",
        "items": [],
        "cartDescription": "",
        "cardNumber": "",
        "expMonth": "",
        "expYear": "",
        "cvvCode": "",
        "nameOnCard": "",
        "saveInstrument": false,
        "bankCode": "",
        "accountNo": "",
        "instrumentId": ""
    }
}


DUAL VERIFICATION (REQUEST TYPE "S")

A scenario where Merchants did receive the only success status and still wish to
again to verify the payment status on real time before informing to end
customer.

This is for Dual Verification of the status and this service is called in case
of Success cases only.


REQUEST PARAMETERS

Below are the parameters that need to be passed for Dual verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.currency It will
be the currency of the transaction through which it is processed "INR".
transaction.token This is the Worldline transaction ID which was sent in
response when the buyer made the payment. transaction.dateTime This is the date
when the transaction was successful in "DD-MM-YYYY" format.
transaction.requestType This is the request identifier. This need to be passed
as "S".


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "transaction": {
    "deviceIdentifier": "S",
    "currency": "INR",
    "dateTime": "17-01-2018",
    "token": "439937277",
    "requestType": "S"
  }
}


RESPONSE PARAMETERS

After getting the request system will validate the request and will fetch
appropriate details and send the response.

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This will be the
Merchant Identifier that Merchant sent during the Worldline transaction.
paymentMethod.bankSelectionCode Bank code through which the transaction was done
paymentTransaction.amount This is the Transaction Amount
paymentTransaction.bankReferenceIdentifier This is the Bank Transaction ID
paymentTransaction.statusCode 0300 - Success
0399 - Failure
0398 - Corporate Transaction Initiated paymentTransaction.statusMessage Status
of the transactions paymentTransaction.errorMessage Error Message in case of
failure paymentTransaction.identifier This is the Worldline transaction ID
paymentTransaction.dateTime This is the date time when the transaction was done
merchantTransactionRequestType This is the request identifier. This will be "S"


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889655",
    "merchantTransactionRequestType": "S",
    "responseType": "S",
    "transactionState": "F",
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "7986032c-7ac0-44f4-906b-5531547142b3",
        "instrumentAliasName": "",
        "instrumentToken": "",
        "bankSelectionCode": "11640",
        "aCS": {
            "bankAcsFormName": "",
            "bankAcsHttpMethod": "",
            "bankAcsParams": [],
            "bankAcsUrl": ""
        },
        "oTP": {
            "initiator": "",
            "message": "",
            "numberOfDigit": "",
            "target": "",
            "type": ""
        },
        "paymentTransaction": {
            "amount": "10.00",
            "balanceAmount": "10.00",
            "bankReferenceIdentifier": "111439937277",
            "dateTime": "17-01-2018 10:09:35",
            "errorMessage": "Success Test Bank Transaction.",
            "identifier": "439937277",
            "refundIdentifier": "NA",
            "statusCode": "0300",
            "statusMessage": "SUCCESS",
            "instruction": {
                "id": "",
                "statusCode": "",
                "errorcode": "",
                "errordesc": ""
            },
            "reference": null,
            "accountNo": null
        },
        "authentication": {
            "type": "",
            "subType": ""
        },
        "error": {
            "code": "",
            "desc": ""
        }
    },
    "error": null
}


OFFLINE VERIFICATION (REQUEST TYPE "O")

Request Type "O" is used for Offline verification of the transaction.

In a scenario where final success or fail status is not received from Worldline
to the Merchant then, Merchant can request status update though "O" request
type.


REQUEST PARAMETERS

Below are the parameters that need to be passed for offline verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.currency It will
be the currency of the transaction through which it is processed "INR".
transaction.identifier This is the Merchant Reference No using which Merchant
can pull the status. transaction.dateTime This is the date when the transaction
was successful in "DD-MM-YYYY" format. transaction.requestType This is the
request identifier. This need to be passed as "O".


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "transaction": {
    "deviceIdentifier": "S",
    "currency": "INR",
    "identifier": "1516163889655",
    "dateTime": "17-01-2018",
    "requestType": "O"
  }
}


RESPONSE PARAMETERS

After getting the request system will validate the request and will fetch
Appropriate details and send the response.

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This will be the
Merchant Identifier that Merchant sent during the Worldline transaction.
paymentMethod.bankSelectionCode Bank code through which the transaction was done
paymentTransaction.amount This is the Transaction Amount
paymentTransaction.bankReferenceIdentifier This is the Bank Transaction ID
paymentTransaction.statusCode 0300 - Success
0399 - Failure
0398 - Corporate Transaction Initiated paymentTransaction.statusMessage Status
of the transactions paymentTransaction.errorMessage Error Message in case of
failure paymentTransaction.identifier This is the Worldline transaction ID
paymentTransaction.dateTime This is the date time when the transaction was done
merchantTransactionRequestType This is the request identifier. This will be "O"


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889655",
    "merchantTransactionRequestType": "O",
    "responseType": "S",
    "transactionState": "F",
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "6effd1a4-9970-4acc-904e-4e6e001d1fdf",
        "instrumentAliasName": "",
        "instrumentToken": "",
        "bankSelectionCode": "11640",
        "aCS": {
            "bankAcsFormName": "",
            "bankAcsHttpMethod": "",
            "bankAcsParams": [],
            "bankAcsUrl": ""
        },
        "oTP": {
            "initiator": "",
            "message": "",
            "numberOfDigit": "",
            "target": "",
            "type": ""
        },
        "paymentTransaction": {
            "amount": "10.00",
            "balanceAmount": "10.00",
            "bankReferenceIdentifier": "111439937277",
            "dateTime": "17-01-2018 10:09:35",
            "errorMessage": "Success Test Bank Transaction.",
            "identifier": "439937277",
            "refundIdentifier": "NA",
            "statusCode": "0300",
            "statusMessage": "SUCCESS",
            "instruction": {
                "id": "",
                "statusCode": "",
                "errorcode": "",
                "errordesc": ""
            },
            "reference": null,
            "accountNo": null
        },
        "authentication": {
            "type": "",
            "subType": ""
        },
        "error": {
            "code": "",
            "desc": ""
        }
    },
    "error": null
}


REGISTER A EMANDATE/ENACH/ESIGN WITH WORLDLINE CHECKOUT

Checkout is the best payment flow, on web and mobile. Checkout provides your
users with a streamlined, mobile-ready payment experience that is constantly
improving.


PARAMETERS IN CHECKOUT

Param name Description Datatype Example Mandatory / Conditional / Optional
deviceId This is the identifier for Hash Algorithm that need the used. Supported
deviceIdentifiers & algorithms are - WEBSH1(SHA-256 algorithm), WEBSH2(SHA-512
algorithm) Alphanumeric WEBSH2 Mandatory deviceId This is the identifier for
Hash Algorithm that need the used. Supported deviceIdentifiers & algorithms are
- ANDROIDSH1(SHA-256 algorithm), ANDROIDSH2(SHA-512 algorithm) Alphanumeric
ANDROIDSH2 Mandatory deviceId This is the identifier for Hash Algorithm that
need the used. Supported deviceIdentifiers & algorithms are - iOSSH1(SHA-256
algorithm), iOSSH2(SHA-512 algorithm) Alphanumeric iOSSH2 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 Worldline]

The last SALT will be the Key given by Worldline Hashing Algorithm will be 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
0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9
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.jsp
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.jsp 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 Worldline end then select
all, if bank selection at Merchant end then pass appropriate mode respective to
selected option char all Mandatory 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 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
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 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 Worldline. 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 items
Product details

itemId : This is scheme code - its value will be shared by Worldline, Every
scheme code will be mapped with a account number at Worldline end where merchant
will receive payout
amount : Amount of each product in `
comAmt : Commission amount of each item in `.
array [{ "itemId" : "first", "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 Worldline Number 123
Conditional accountNo Customer account no required for TPV transaction and
eMandate/eNACH/eSign Number ******1111 Conditional accountType Customer account
type required to register
Available options are as below:
Saving : Saving
Current : Current

Alphabet Saving Conditional accountHolderName Account holder name required for
eSign, eNACH and ICIC eMandate Alphabets, apostrophe and Dot Customer’s name.
Conditional aadharNo Customer aadhaar no required for eSign only Number
******1111 Conditional ifscCode Customer bank’s IFSC 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 pan Consumer PAN no. capture by merchant.
Alphanumeric ABCD1234F Optional phoneNumber Consumer Phone No. capture by
merchant. Number 7555328823 Optional


MANDATE REGISTRATION CHARGES

Bank Name E Mandate Token Charges Remark Default Amount to be passed Inline
Debit Supported HDFC BANK
eMandate Rs. 2.00 Bank Refunds the amount to is customer within T+3 days Rs.
1.00 Yes. Basis Approval Axis Bank
eMandate Rs. 1.00 Bank retains the amount at their end and does not refund the
same to the customer. Rs. 1.00 No ICICI Bank
eMandate Rs. 1.00 Bank does not refund the amount to the customer. Rs. 1.00 Yes.
Basis Approval State Bank of India
eMandate Rs. 1.00 Bank refunds the amount to the customer within T +2 working
days. They are in the process of changing their system where the Re. 1/- that is
debited by them will not be refunded to us and will be retained at their end.
Rs. 1.00 No ENACH Depends on Bank Each bank have their own charges which is
deducted directly from customers account Rs. 1.00 No Esign NA NA Rs. 1.00 No


EMANDATE/ENACH AMOUNT LIMIT

E Mandate

 1. ICIC Bank - As per bank limit
 2. HDFC - 1 Lac
 3. SBI - As per bank limit
 4. Axis Bank - As per bank limit

E NACH

 1. For all the banks - 10 Lac. For Security Mandate - 50 Lac
 2. SIC - Max Card limit

E Sign

 1. For all the banks - 1 Lac


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" />

jQuery library 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.
    
    Checkout 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 SAVE & RUN 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">Register Now</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 reqJson = {
                "features": {
                    "enableAbortResponse": true,
                    "enableNewWindowFlow": true,    //for hybrid applications please disable this by passing false
                    "enableExpressPay": true,
                    "enableMerTxnDetails": true,
                    "siDetailsAtMerchantEnd": true,
                    "enableSI": true
                },
                "consumerData": {
                    "deviceId": "WEBSH2",    //possible values "WEBSH1" or "WEBSH2"
                    "token": "61d4cd37d5f7732f0eca7a0b7bee950b32bc1f0de6f1f544d952ebefbe8e20c743920f4e48368b7bd65b2e6a1d72a6b59d41438dfb85ca53a72205bdc4f0c952",
                    "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-vertical.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": "1703166429879",   //Unique merchant transaction ID
                    "items": [{
                        "itemId": "first",
                        "amount": "5",
                        "comAmt": "0"
                    }],
                    "customStyle": {
                        "PRIMARY_COLOR_CODE": "#45beaa",   //merchant primary color code
                        "SECONDARY_COLOR_CODE": "#FFFFFF",   //provide merchant's suitable color code
                        "BUTTON_COLOR_CODE_1": "#2d8c8c",   //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(reqJson);
            if(reqJson.features.enableNewWindowFlow){
                pnCheckoutShared.openNewWindow();
            }
        });
    });
    </script>
    </body>
    
    </html>
    
    LIVE CODE PREVIEW

 3. We will send response using post method in msg key on provided returnUrl.
    You need to capture msg key’s value which will be in pipe(|) separated
    format as mentioned below:
    
    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 checkout initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.


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.

Following is the initial requirement to integrate Checkout SDK in your Android
application:

Minimum Required SDK API 21(Lollipop Version) Target SDK API 33(Android13)
Compiled With API 33(Android13)

 1. Download weipl_checkout aar file into module’s libs.
    
    weipl_checkout.aar

 2. Include below lines in dependencies section of module’s build.gradle:
    
    implementation "androidx.appcompat:appcompat:1.4.2"
    implementation "androidx.constraintlayout:constraintlayout:2.1.2"
    implementation "com.android.volley:volley:1.2.1"
                   
    implementation files("libs/weipl_checkout.aar")
    
    If you want to integrate eSign Biometric then download protean-esign-v-2.3
    aar file and add it as a module to your project. Also add its entry in
    settings.gradle.
    Add below line in dependencies section of your app build.gradle:
    
    implementation project(path: ":protean-esign-v-2.3")

 3. Import WLCheckoutActivity as follows to invoke Checkout
    
    import com.weipl.checkout.WLCheckoutActivity;
    

 4. You have to call preloadData() method and set listener in calling activity’s
    onCreate() method so that SDKs dependecy files will be preloaded & available
    at the time of checkout.
    
    WLCheckoutActivity.setPaymentResponseListener(this);
    WLCheckoutActivity.preloadData(applicationContext);

 5. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    JSONObject reqJson = new JSONObject();
    
    JSONObject jsonFeatures = new JSONObject();
    jsonFeatures.put("enableAbortResponse", true);
    jsonFeatures.put("enableExpressPay", true);
    jsonFeatures.put("enableMerTxnDetails", true);
    jsonFeatures.put("siDetailsAtMerchantEnd", true);
    jsonFeatures.put("enableSI", true);
    reqJson.put("features", jsonFeatures);
    
    JSONObject jsonConsumerData = new JSONObject();
    jsonConsumerData.put("deviceId", "AndroidSH2");        //possible values "AndroidSH1" or "AndroidSH2"
    jsonConsumerData.put("token", "74b46f90e358695a705e0549fb510fa5f50f711f4e7c7d4b102d362f7792ef9cce117cb37243dacb04c9aa6b8f2f57311254d938d6ff7955becb8fbf5484f09c");
    jsonConsumerData.put("paymentMode", "netBanking");
    jsonConsumerData.put("merchantLogoUrl","https://www.paynimo.com/CompanyDocs/company-logo-vertical.png");
    jsonConsumerData.put("merchantId","L3348");
    jsonConsumerData.put("currency","INR");
    jsonConsumerData.put("consumerId","c964634");
    jsonConsumerData.put("consumerMobileNo","9876543210");
    jsonConsumerData.put("consumerEmailId","test@test.com");
    jsonConsumerData.put("txnId", "1667804027874");
    JSONArray jArrayItems = new JSONArray();
    JSONObject jsonItem1 = new JSONObject();
    jsonItem1.put("itemId", "first");
    jsonItem1.put("amount", "5");
    jsonItem1.put("comAmt", "0");
    jArrayItems.put(jsonItem1);
    jsonConsumerData.put("items", jArrayItems);
    JSONObject jsonCustomStyle = new JSONObject();
    jsonCustomStyle.put("PRIMARY_COLOR_CODE", "#45beaa");
    jsonCustomStyle.put("SECONDARY_COLOR_CODE", "#ffffff");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_1", "#2d8c8c");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_2", "#ffffff");
    jsonConsumerData.put("customStyle",jsonCustomStyle);
    //jsonConsumerData.put("accountNo", "******1111");    //Pass this if accountNo is captured at merchant side for eMandate/eNACH
    //jsonConsumerData.put("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.
    //jsonConsumerData.put("ifscCode", "ICIC0000001");    //Pass this if ifscCode is captured at merchant side.
    jsonConsumerData.put("accountType", "Saving");  //Required for eNACH registration this is mandatory field
    jsonConsumerData.put("debitStartDate", "10-03-2019");
    jsonConsumerData.put("debitEndDate", "01-03-2047");
    jsonConsumerData.put("maxAmount", "100");
    jsonConsumerData.put("amountType", "M");
    jsonConsumerData.put("frequency", "ADHO");    //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
    
    reqJson.put("consumerData", jsonConsumerData);
    
    WLCheckoutActivity.open(currentContext, reqJson);    //currentContext will be current activity context

 6. Getting response Back from WLCheckoutActivity in merchant's Activity
    
    @override 
    public void wlCheckoutPaymentResponse(JSONObject response) {
        Log.d("In wlCheckoutPaymentResponse()", response.toString());
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @override 
    public void wlCheckoutPaymentError(JSONObject response) {
        Log.d("In wlCheckoutPaymentError()", response.toString());
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.


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.

 1. import checkout SDK class
    
    import weipl_checkout

 2. Declare WLCheckout Class variable:
    
    var WLCheckout : WLCheckoutViewController?

 3. You have to call preloadData() inside viewDidLoad() method so that SDKs
    dependecy files will be preloaded & available at the time of checkout.
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentResponse(result:)), name: Notification.Name("wlCheckoutPaymentResponse"), object: nil)
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentError(result:)), name: Notification.Name("wlCheckoutPaymentError"), object: nil)
    
    WLCheckout = WLCheckoutViewController()
    WLCheckout?.preloadData()

 4. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    let reqJson : [String:Any] = [
        "features" : [
            "enableAbortResponse": true,
            "enableExpressPay": true,
            "enableMerTxnDetails": true,
            "siDetailsAtMerchantEnd": true,
            "enableSI": true
        ],
        "consumerData": [
            "deviceId": "iOSSH2",    //possible values "iOSSH1" or "iOSSH2"
            "token": "74b46f90e358695a705e0549fb510fa5f50f711f4e7c7d4b102d362f7792ef9cce117cb37243dacb04c9aa6b8f2f57311254d938d6ff7955becb8fbf5484f09c",
            "paymentMode": "netBanking",
            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
            "merchantId": "L3348",
            "currency": "INR",
            "consumerId": "c964634",
            "consumerMobileNo": "9876543210",
            "consumerEmailId": "test@test.com",
            "txnId": "1665386045757",   //Unique merchant transaction ID
            "items": [[
                "itemId": "first",
                "amount": "5",
                "comAmt": "0"
            ]],
            "customStyle": [
                "PRIMARY_COLOR_CODE": "#45beaa",    // RGB and Hex and RGB supported parameter
                "SECONDARY_COLOR_CODE": "#ffffff",
                "BUTTON_COLOR_CODE_1": "#2d8c8c",
                "BUTTON_COLOR_CODE_2": "#ffffff",
            ],
            //"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
        ]
    ]
    
    do {
       let jSONObject = String(data: try JSONSerialization.data(withJSONObject: reqJson, options: .prettyPrinted), encoding: String.Encoding(rawValue: NSUTF8StringEncoding))
       WLCheckout!.open(requestObj: jSONObject!)
       DispatchQueue.main.async{
          self.present(self.WLCheckout!, animated: true, completion: nil)
       }
    } catch _ as NSError {
       
    }

 5. Getting response Back from WLCheckoutViewController in merchant's
    ViewController
    
    @objc func wlCheckoutPaymentResponse(result: Notification) {
        print("\(result.object!)")
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @objc func wlCheckoutPaymentError(result: Notification) {
        print("\(result.object!)")
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.

 6. Plist specific changes
    
    Add required UPI intent calling and process data in background permissions
    in plist file
    
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>phonepe</string>
        <string>gpay</string>
        <string>paytm</string>
    </array>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>processing</string>
    </array>
    
    

Xcode Setup

 1. Set Minimum Target version : 12.0
 2. Direct Integration Setup
    * Download latest release of weipl_checkout.xcframework.zip & drag
      .xcframework in "Framework, libraries, and Embedded content" and set
      "Embed & Sign" option.
 3. For CocoaPod Setup
    * Visit CocoaPod for our SDK installation in your project.
 4. For Swift Package Manager Setup
    * To add weipl_checkout package dependency to your Xcode project, select
      File > Swift Packages > Add Package Dependency and enter
      https://github.com/Worldline-ePayments-India/weipl-checkout-ios.git.
    * You can also navigate to your target's General pane, and in the
      "Frameworks, Libraries, and Embedded Content" section, click the + button,
      select Add Other, and choose Add Package Dependency.

--------------------------------------------------------------------------------


CONFIGURATION OPTIONS

Note: All features and provided options are needs to be added in existing
request options as per your features need.

Option Description 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 eMandate/eNACH/eSign then
enable this flag by passing value true during checkout initialization in below
manner.


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "netBanking",
        "bankCode": "11640",  //bank code captured from merchant end[bank codelist provided by ]
        "accountNo": "******1111"  //Mandatory to register eMandate/eNACH
    }
}

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
eMandate/eNACH/eSign 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 eMandate/eNACH/eSign details
are captured in checkout.


debitStartDate, debitEndDate, maxAmount, amountType , frequency


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true,
        "siDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "netBanking",
        "consumerId": "c9",  //Your unique consumer identifier to register a eMandate/eNACH
        "bankCode": "11640",  //bank code captured from merchant end[bank codelist provided by ]
        "accountNo": "******1111",  //Mandatory to register eMandate/eNACH
        "debitStartDate": "01-01-2019",
        "debitEndDate": "01-01-2046",
        "maxAmount": "100",
        "amountType": "M",
        "frequency": "MNTH" //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
    }
}

hideSIDetails It’s false by default, To enable this feature set hideSIDetails
and siDetailsAtMerchantEnd value to true. If this flag is enabled and all
eMandate/eNACH/eSign 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 eMandate/eNACH/eSign
registration merchant need to enable this feature during checkout
initialization. expandSIDetails It’s false by default, after enabling this
feature checkout shows eMandate/eNACH/eSign details in expanded mode by default.
hideSIConfirmation It’s false by default, if eMandate/eNACH/eSign details
captures from merchant end then checkout shows confirmation screen to end
customer before eMandate/eNACH/eSign registration. To hide this confirmation
screen in eMandate/eNACH/eSign registration pass this flag value as true.
showSIResponseMsg It’s false by default, this flag is enabled checkout shows
eMandate/eNACH/eSign registrations details also in final checkout response on
return page.


AVAILABLE PARAMETERS AND THEIR DEFAULT VALUES

{
    "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": "WEBSH2",
        "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": ""
    }
}


MANDATE VERIFICATION

Note:- This is a mandatory API which should be used to fetch the status of the
mandate. Mandate verification API cannot be for dual verification. It is only
used to check the status of the mandates for which status / online response is
not received at merchant end. Even for using the mandate verification, we
suggest the merchant to keep a time gap of upto 1 hour for mandate verification
or do verification for all pending cases on T+1 since there can be a case where
Worldline has not received real time response and we fetch from banks / NPCI
which can take upto 1 hour.

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for mandate verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during registration
consumer.identifier This is the consumer ID that is passed in the initial
request transaction.dateTime This is the date when the transaction date time in
"DD-MM-YYYY" format transaction.type This should be "002" transaction.subType
This should be "002" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {}
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889655",
    "dateTime": "17-01-2018",
    "subType": "002",
    "requestType": "TSI"
  },
  "consumer": {
    "identifier": "c90001008"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.token Mandate registration number
paymentMethod.paymentTransaction.statusCode This will be 0300 for Success, 0398
for Initiated and 0399 for Failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success and "F" in case of failure paymentMethod.error.code This is the error
code in case of failure paymentMethod.error.desc This is the error desc in case
of failure paymentMethod.paymentTransaction.bankReferenceIdentifier This is the
UMRN No (specifically for ENACH cases)


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889655",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "752410399",
        "instrumentAliasName": "",
        "instrumentToken": "123456",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "",
            "errorMessage": "Mandate Verification Successfull",
            "identifier": "439937277",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "Mandate Verification Successfull",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "",
            "desc": "Mandate Verification Successfull"
        }
    },
    "error": null
}


TRANSACTION SCHEDULING

Merchant will send the below JSON data with the Amount and debit date for
scheduling the transaction.

Post getting the request Worldline system will validate the data and then will
schedule the transaction. This scheduling request should be initiated before 2
days of the debit date.


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction scheduling.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant for transaction scheduling
payment.instruction.identifier This is the unique mandate registration id sent
by Worldline system in successful mandate registration request
payment.instrument.identifier Pass the scheme code in this parameter
payment.instruction.amount Amount that need to be debitted
payment.instruction.endDateTime This is the date when the transaction need to be
debited in "DDMMYYYY" format transaction.type This should be "002"
transaction.subType This should be "003" transaction.requestType This should be
"TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instrument": {
      "identifier": "first"
    },
    "instruction": {
      "amount": "10",
      "endDateTime": "17012018",
      "identifier": "752410399"
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889656",
    "subType": "003",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.amount Amount that need to
be debitted paymentMethod.paymentTransaction.dateTime This is the date when the
transaction need to be debited in "DD-MM-YYYY" format
paymentMethod.paymentTransaction.identifier This is the unique Identifier
generated by Worldline system paymentMethod.paymentTransaction.statusMessage
This will be "S" in case of Success, "I" in case of Initiated and "F" in case of
failure paymentMethod.paymentTransaction.statusCode This will be "0300" in case
of Success, "0398" in case of Initiated and "0399" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.error.desc This is the error desc in case of failure


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889656",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "",
        "instrumentAliasName": "",
        "instrumentToken": "",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "10",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "17012018",
            "errorMessage": "Transaction scheduling request has been initiated",
            "identifier": "700000003426",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "I",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "S1006",
            "desc": "Transaction scheduling request has been initiated"
        }
    },
    "error": null
}


TRANSACTION VERIFICATION

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during transaction
scheduling transaction.dateTime This is the date when the transaction date time
in "DD-MM-YYYY" format transaction.type This should be "002" transaction.subType
This should be "004" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889656",
    "dateTime": "17-01-2018",
    "subType": "004",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.statusCode This will be
"0300" in case of Success and "0399" in case of failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success, "I" in case of Initiated and "F" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.paymentTransaction.errorMessage This is the error desc in case of
failure


SAMPLE RESPONSE

{
  "merchantCode": "L3348",
  "merchantTransactionIdentifier": "1516163889656",
  "merchantTransactionRequestType": "TSI",
  "responseType": "web",
  "transactionState": null,
  "paymentMethod": {
    "token": "",
    "instrumentAliasName": "",
    "instrumentToken": "",
    "bankSelectionCode": "",
    "aCS": null,
    "oTP": null,
    "paymentTransaction": {
      "amount": "",
      "balanceAmount": "",
      "bankReferenceIdentifier": "",
      "dateTime": "",
      "errorMessage": "",
      "identifier": "",
      "refundIdentifier": "",
      "statusCode": "0300",
      "statusMessage": "S",
      "instruction": null,
      "reference": null
    },
    "authentication": null,
    "error": {
      "code": "",
      "desc": ""
    }
  }
}


REGISTER A UPI MANDATE WITH WORLDLINE CHECKOUT

 * UPI Recurring
    * Create
    * Update / Modify
    * Delete / Revoke

 * UPI Inline Debit
 * UPI OTM

Checkout is the best payment flow, on web and mobile. Checkout provides your
users with a streamlined, mobile-ready payment experience that is constantly
improving.

Live Bank & App list -
https://www.npci.org.in/what-we-do/upi/upi-autopay/list-of-banks-and-apps-live-on-upi-autopay


PARAMETERS IN CHECKOUT

Param name Description Datatype Example Mandatory / Conditional / Optional
deviceId This is the identifier for Hash Algorithm that need the used. Supported
deviceIdentifiers & algorithms are - WEBSH1(SHA-256 algorithm), WEBSH2(SHA-512
algorithm) Alphanumeric WEBSH2 Mandatory deviceId This is the identifier for
Hash Algorithm that need the used. Supported deviceIdentifiers & algorithms are
- ANDROIDSH1(SHA-256 algorithm), ANDROIDSH2(SHA-512 algorithm) Alphanumeric
ANDROIDSH2 Mandatory deviceId This is the identifier for Hash Algorithm that
need the used. Supported deviceIdentifiers & algorithms are - iOSSH1(SHA-256
algorithm), iOSSH2(SHA-512 algorithm) Alphanumeric iOSSH2 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 Worldline]

The last SALT will be the Key given by Worldline Hashing Algorithm will be SHA1
or SHA2 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
0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9
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.jsp
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.jsp 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 UPI), If Bank selection is at Worldline end then select all, if
bank selection at Merchant end then pass appropriate mode respective to selected
option char all Mandatory 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 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
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 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 Worldline. Alphanumeric T1234 Mandatory consumerId Consumer id
assigned by merchant, This is required if enableSI or enableExpressPay or
payWithSavedInstrument or enableInstrumentRegistration feature is enabled
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 items Product details

itemId : This is scheme code - its value will be shared by Worldline, Every
scheme code will be mapped with a account number at Worldline end where merchant
will receive payout
amount : Amount of each product in `
comAmt : Commission amount of each item in `.
array [{ "itemId" : "first", "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 Worldline Number 123
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 UPI Mandate registration.

Available options are as below:
DAIL : Daily
WEEK : Weekly
MNTH : Monthly
QURT : Quarterly
MIAN : Semi Annually / Half Yearly
YEAR : Yearly
BIMN : Bi- monthly
ADHO : As and when presented
OT : One Time Mandate (This option is available only if one time mandate mode is
configured with merchant id)

Alphanumeric ADHO Conditional debitRule Recurrence rule defines when debit can
be done. (Not applicable when selected frequency is OT/ ADHO/ DAIL)

Available options are as below:
ON : On
BF : Before
AF : After

Alphanumeric ON Conditional debitDay It represents the day on which debit needs
to be done. (Not applicable when selected frequency is OT/ ADHO/ DAIL) Number 1
Conditional mandateRegType Mandate registration type.

Available options are as below:
create : Create
update : Update
delete : Delete

Alphanumeric create Mandatory mandateId The registered mandate Id shuld pass in
case of Update and Delete Number 7526985 Conditional


MANDATE REGISTRATION CHARGES

Bank Name E Mandate Token Charges Remark Default Amount to be passed Inline
Debit Supported UPI Recurring (Without inline Debit) NA NA Rs. 1.00 No UPI
Inline Debit Recurring NA NA Rs. {ACTUAL_TRANSACTION_AMOUNT} Yes


UPI MANDATES - CREATE

 1. Maximum mandate amount of 1 Lakh can be registered
 2. For amount upto 15000, there will be no authorization on subsequent debits.
 3. For all amount greater than 15000 there is a mandatory authorization
    required from end customer.
 4. The first recurring debit, has to be authorized whatsoever irrespective of
    the amount.


ADDITIONAL PARAMETERS AVAILABLE IN UPI

Debit Day: It represents the day on which debit needs to be done

 * It can be ON, Before or After
 * ON: The execution of the mandate is to happen on the same day as specified in
   Debit day parameter
 * Before/ After: Recurrence rules creates a span of days between which the
   payee can execute the mandate
 * All recurrence rules are limited to range of values like 1-7, 1-16 or 1-31,
   so debit Day parameter can only take one of the values from the range basis
   the rule used
 * E.g. When "weekly" rule is used with "BEFORE" and value is "5" then payee can
   execute the mandate from 1 to 5(inclusive of) for that week.
 * Similarly if rule was "AFTER" then allowed execution days would be 5, 6 & 7
 * For recurrence patterns "Monthly", "Quarterly", "Half-yearly" & "Annually"
   when the rule is "BEFORE" and value is "17" then the allowed execution days
   are 1 to 17th within "that month"
 * If frequency is one time, daily or As-Presented then before/on/after is not
   applicable


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" />

jQuery library 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.
    
    Checkout 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 SAVE & RUN 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">Register Now</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 reqJson = {
                "features": {
                    "enableAbortResponse": true,
                    "enableNewWindowFlow": true, //for hybrid applications please disable this by passing false
                    "enableExpressPay": true,
                    "enableMerTxnDetails": true,
                    "siDetailsAtMerchantEnd": true,
                    "enableSI": true,
                    "enableInlineAutoDebit": true
                },
                "consumerData": {
                    "deviceId": "WEBSH2", //possible values "WEBSH1" or "WEBSH2"
                    "token": "8769ec3d1783864a2bf2da06219025d8362d8176ab3489bfc0c087172be76e8d985dfae4f9a972b4fcf286ba8aa856403af6e53c8d60f91a18d5f64f3bd64163",
                    "returnUrl": "https://pgproxyuat.in.worldline-solutions.com/linuxsimulator/MerchantResponsePage.jsp",
                    "responseHandler": "",
                    "paymentMode": "UPI",
                    "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png", //provided merchant logo will be displayed
                    "merchantId": "L3348",
                    "currency": "INR",
                    "consumerId": "c1617868381227",
                    "consumerMobileNo": "9876543210",
                    "consumerEmailId": "test@test.com",
                    "txnId": "1703166429880", //Unique merchant transaction ID
                    "items": [{
                        "itemId": "first",
                        "amount": "1",
                        "comAmt": "0"
                    }],
                    "customStyle": {
                        "PRIMARY_COLOR_CODE": "#45beaa",
                        "SECONDARY_COLOR_CODE": "#FFFFFF",
                        "BUTTON_COLOR_CODE_1": "#2d8c8c",
                        "BUTTON_COLOR_CODE_2": "#FFFFFF"
                    },
                    "vpa": "",
                    "accountType": "",
                    "debitStartDate": "08-04-2021",
                    "debitEndDate": "30-04-2021",
                    "maxAmount": "1",
                    "amountType": "M",
                    "frequency": "ADHO",
                    "debitDay": "0", //It represents the day on which debit needs to be done
                    "debitRule": "NA" //Recurrence rule defines when debit can be done possible values "ON", "BF", "AF"
                }
            };
    
            $.pnCheckout(reqJson);
            if(reqJson.features.enableNewWindowFlow){
                pnCheckoutShared.openNewWindow();
            }
        });
    });
    </script>
    </body>
    
    </html>
    
    LIVE CODE PREVIEW

 3. We will send response using post method in msg key on provided returnUrl.
    You need to capture msg key’s value which will be in pipe(|) separated
    format as mentioned below:
    
    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 checkout initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.


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.

Following is the initial requirement to integrate Checkout SDK in your Android
application:

Minimum Required SDK API 21(Lollipop Version) Target SDK API 33(Android13)
Compiled With API 33(Android13)

 1. Download weipl_checkout aar file into module’s libs
    
    weipl_checkout.aar

 2. Include below lines in dependencies section of module’s build.gradle file:
    
    implementation "androidx.appcompat:appcompat:1.4.2"
    implementation "androidx.constraintlayout:constraintlayout:2.1.2"
    implementation "com.android.volley:volley:1.2.1"
                   
    implementation files("libs/weipl_checkout.aar")

 3. Import WLCheckoutActivity as follows to invoke Checkout
    
    import com.weipl.checkout.WLCheckoutActivity;
    

 4. You have to call preloadData() method and set listener in calling activity’s
    onCreate() method so that SDKs dependecy files will be preloaded & available
    at the time of checkout.
    
    WLCheckoutActivity.setPaymentResponseListener(this);
    WLCheckoutActivity.preloadData(applicationContext);

 5. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    JSONObject reqJson = new JSONObject();
    
    JSONObject jsonFeatures = new JSONObject();
    jsonFeatures.put("enableAbortResponse", true);
    jsonFeatures.put("enableExpressPay", true);
    jsonFeatures.put("enableMerTxnDetails", true);
    jsonFeatures.put("siDetailsAtMerchantEnd", true);
    jsonFeatures.put("enableSI", true);
    reqJson.put("features", jsonFeatures);
    
    JSONObject jsonConsumerData = new JSONObject();
    jsonConsumerData.put("deviceId", "AndroidSH2");        //possible values "AndroidSH1" or "AndroidSH2"
    jsonConsumerData.put("token", "838931cce0653dca265f6be3c6e6dbe204341c527441e4e152fe32dc2ff81aa8e1ab255764cbd7fa646f61303b841ba3446226badefc84b3388053741699fa9c");
    jsonConsumerData.put("paymentMode", "UPI");
    jsonConsumerData.put("merchantLogoUrl","https://www.paynimo.com/CompanyDocs/company-logo-vertical.png");
    jsonConsumerData.put("merchantId","L3348");
    jsonConsumerData.put("currency","INR");
    jsonConsumerData.put("consumerId","c1617868381227");
    jsonConsumerData.put("consumerMobileNo","9876543210");
    jsonConsumerData.put("consumerEmailId","test@test.com");
    jsonConsumerData.put("txnId", "1667804027874");
    JSONArray jArrayItems = new JSONArray();
    JSONObject jsonItem1 = new JSONObject();
    jsonItem1.put("itemId", "first");
    jsonItem1.put("amount", "1");
    jsonItem1.put("comAmt", "0");
    jArrayItems.put(jsonItem1);
    jsonConsumerData.put("items", jArrayItems);
    JSONObject jsonCustomStyle = new JSONObject();
    jsonCustomStyle.put("PRIMARY_COLOR_CODE", "#45beaa");
    jsonCustomStyle.put("SECONDARY_COLOR_CODE", "#ffffff");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_1", "#2d8c8c");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_2", "#ffffff");
    jsonConsumerData.put("customStyle",jsonCustomStyle);
    //jsonConsumerData.put("vpa", "");
    jsonConsumerData.put("accountType", "");
    jsonConsumerData.put("debitStartDate", "08-04-2021");
    jsonConsumerData.put("debitEndDate", "30-04-2021");
    jsonConsumerData.put("maxAmount", "1");
    jsonConsumerData.put("amountType", "M");
    jsonConsumerData.put("debitDay", "0"); //It represents the day on which debit needs to be done
    jsonConsumerData.put("debitRule", "NA");
    
    reqJson.put("consumerData", jsonConsumerData);
    
    WLCheckoutActivity.open(currentContext, reqJson);    //currentContext will be current activity context

 6. Getting response Back from WLCheckoutActivity in merchant's Activity
    
    @override 
    public void wlCheckoutPaymentResponse(JSONObject response) {
        Log.d("In wlCheckoutPaymentResponse()", response.toString());
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @override 
    public void wlCheckoutPaymentError(JSONObject response) {
        Log.d("In wlCheckoutPaymentError()", response.toString());
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.


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.

 1. import checkout SDK class
    
    import weipl_checkout

 2. Declare WLCheckout Class variable:
    
    var WLCheckout : WLCheckoutViewController?

 3. You have to call preloadData() inside viewDidLoad() method so that SDKs
    dependecy files will be preloaded & available at the time of checkout.
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentResponse(result:)), name: Notification.Name("wlCheckoutPaymentResponse"), object: nil)
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentError(result:)), name: Notification.Name("wlCheckoutPaymentError"), object: nil)
    
    WLCheckout = WLCheckoutViewController()
    WLCheckout?.preloadData()

 4. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    let reqJson : [String:Any] = [
        "features" : [
            "enableAbortResponse": true,
            "enableExpressPay": true,
            "enableMerTxnDetails": true,
            "siDetailsAtMerchantEnd": true,
            "enableSI": true
        ],
        "consumerData": [
            "deviceId": "iOSSH2",    //possible values "iOSSH1" or "iOSSH2"
            "token": "838931cce0653dca265f6be3c6e6dbe204341c527441e4e152fe32dc2ff81aa8e1ab255764cbd7fa646f61303b841ba3446226badefc84b3388053741699fa9c",
            "paymentMode": "UPI",
            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
            "merchantId": "L3348",
            "currency": "INR",
            "consumerId": "c1617868381227",
            "consumerMobileNo": "9876543210",
            "consumerEmailId": "test@test.com",
            "txnId": "1617868381227",   //Unique merchant transaction ID
            "items": [[
                "itemId": "first",
                "amount": "1",
                "comAmt": "0"
            ]],
            "customStyle": [
                "PRIMARY_COLOR_CODE": "#45beaa",    // RGB and Hex and RGB supported parameter
                "SECONDARY_COLOR_CODE": "#ffffff",
                "BUTTON_COLOR_CODE_1": "#2d8c8c",
                "BUTTON_COLOR_CODE_2": "#ffffff",
            ],
            "vpa": "",
            "accountType": "",
            "debitStartDate": "08-04-2021",
            "debitEndDate": "30-04-2021",
            "maxAmount": "1",
            "amountType": "M",
            "frequency": "ADHO",
            "debitDay": "0", //It represents the day on which debit needs to be done
            "debitRule": "NA" //Recurrence rule defines when debit can be done possible values "ON", "BF", "AF"
        ]
    ]
    
    do {
       let jSONObject = String(data: try JSONSerialization.data(withJSONObject: reqJson, options: .prettyPrinted), encoding: String.Encoding(rawValue: NSUTF8StringEncoding))
       WLCheckout!.open(requestObj: jSONObject!)
       DispatchQueue.main.async{
          self.present(self.WLCheckout!, animated: true, completion: nil)
       }
    } catch _ as NSError {
       
    }

 5. Getting response Back from WLCheckoutViewController in merchant's
    ViewController
    
    @objc func wlCheckoutPaymentResponse(result: Notification) {
        print("\(result.object!)")
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @objc func wlCheckoutPaymentError(result: Notification) {
        print("\(result.object!)")
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.

 6. Plist specific changes
    
    Add required UPI intent calling and process data in background permissions
    in plist file
    
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>phonepe</string>
        <string>gpay</string>
        <string>paytm</string>
    </array>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>processing</string>
    </array>
    
    

Xcode Setup

 1. Set Minimum Target version : 12.0
 2. Direct Integration Setup
    * Download latest release of weipl_checkout.xcframework.zip & drag
      .xcframework in "Framework, libraries, and Embedded content" and set
      "Embed & Sign" option.
 3. For CocoaPod Setup
    * Visit CocoaPod for our SDK installation in your project.
 4. For Swift Package Manager Setup
    * To add weipl_checkout package dependency to your Xcode project, select
      File > Swift Packages > Add Package Dependency and enter
      https://github.com/Worldline-ePayments-India/weipl-checkout-ios.git.
    * You can also navigate to your target's General pane, and in the
      "Frameworks, Libraries, and Embedded Content" section, click the + button,
      select Add Other, and choose Add Package Dependency.

--------------------------------------------------------------------------------


CONFIGURATION OPTIONS

Note: All features and provided options are needs to be added in existing
request options as per your features need.

Option Description 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 UPI mandate then enable this
flag by passing value true during checkout initialization in below manner.


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "UPI",
        "items": [{
            "itemId": "first",
            "amount": "1",
            "comAmt": "0"
        }],
        "txnId": "148111515", //Unique merchant transaction ID
        "bankCode": "11640",  //bank code captured from merchant end[bank codelist provided by ]
        "vpa": "testVpa@icici"  //Mandatory to register UPI mandate
    }
}

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 UPI mandate
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 UPI mandate details are
captured in checkout.


debitStartDate, debitEndDate, maxAmount, amountType , frequency


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true,
        "siDetailsAtMerchantEnd": true,
        "enableInlineAutoDebit": false
    },
    "consumerData": {
        "paymentMode": "UPI",
        "items": [{
            "itemId": "first",
            "amount": "1",
            "comAmt": "0"
        }],
        "bankCode": "28250",  //bank code captured from merchant end[bank codelist provided by ]
        "vpa": "testVpa@icici"  //Mandatory to register UPI mandate
        "debitStartDate": "26-03-2021",
        "debitEndDate": "01-03-2051",
        "maxAmount": "100",
        "amountType": "M",
        "frequency": "ADHO",
        "debitDay": "0",
        "debitRule": "NA"
    }
}

hideSIDetails It’s false by default, To enable this feature set hideSIDetails
and siDetailsAtMerchantEnd value to true. If this flag is enabled and all UPI
mandate 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 UPI mandate registration merchant need
to enable this feature during checkout initialization. expandSIDetails It’s
false by default, after enabling this feature checkout shows UPI mandate details
in expanded mode by default. hideSIConfirmation It’s false by default, if UPI
mandate details captures from merchant end then checkout shows confirmation
screen to end customer before UPI mandate registration. To hide this
confirmation screen in UPI mandate registration pass this flag value as true.
showSIResponseMsg It’s false by default, this flag is enabled checkout shows UPI
mandate registrations details also in final checkout response on return page.
enableInlineAutoDebit It’s false by default, this flag allows user to pay along
with registration.

UPI Mandate - Modify

 * Mandates can be modified by passing the relevant Mandate ID
 * Only End Date and Amount can be changed during modify mandate
 * Payer needs to authorize the modification in the mandate by UPI PIN
 * Need to pass mandate registration type in mandateRegType = 'update' and
   mandate Id in mandateId

   {
       "features": {
           "enableExpressPay": true,
           "enableSI": true,
           "payDetailsAtMerchantEnd": false,
           "siDetailsAtMerchantEnd": true,
           "enableInlineAutoDebit": false
       },
       "consumerData": {
           "paymentMode": "UPI",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "10",
               "comAmt": "0"
           }],
           "vpa": ""  //Mandatory to register UPI mandate
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-03-2051",
           "maxAmount": "100",
           "amountType": "M",
           "frequency": "ADHO",
           "debitDay": "0",
           "debitRule": "NA"
           "mandateRegType": "update", //mandate registration type
           "mandateId": "725639" //mandate Id
       }
   }

UPI Mandate - Revoke

 * Mandate once revoked can"t be undone.
 * On a revoked mandate no further executions can be done
 * If the Revoke is initiated by Payee there is no UPI PIN required
 * Need to pass mandate registration type in mandateRegType = 'delete' and
   mandate Id in mandateId

   {
       "features": {
           "enableExpressPay": true,
           "enableSI": true,
           "payDetailsAtMerchantEnd": false,
           "siDetailsAtMerchantEnd": true,
           "enableInlineAutoDebit": false
       },
       "consumerData": {
           "paymentMode": "UPI",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "vpa": ""  //Mandatory to register UPI mandate
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-03-2051",
           "maxAmount": "100",
           "amountType": "M",
           "frequency": "ADHO",
           "debitDay": "0",
           "debitRule": "NA"
           "mandateRegType": "delete", //mandate registration type
           "mandateId": "725639" //mandate Id
       }
   }

UPI Mandate - Inline Debit

 * Inline debit in UPI means that there will be 2 seperate transactions created.
   One for registration and one for transaction.
 * If first "Execute mandate" is implemented within 3 minutes of creation of
   Mandate then customer’s authentication is not required otherwise customer
   needs to authorize the first debit even for transaction below Rs. 5,000.
 * The mandate stands cancelled if the inline debit transaction fails.
 * Need to pass enableInlineAutoDebit = true

   {
       "features": {
           "enableExpressPay": true,
           "enableSI": true,
           "payDetailsAtMerchantEnd": true,
           "siDetailsAtMerchantEnd": true,
           "enableInlineAutoDebit": true
       },
       "consumerData": {
           "paymentMode": "UPI",
           "consumerId": "c96463452",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "bankCode": "28250",  //bank code captured from merchant end[bank codelist provided by ]
           "vpa": "testVpa@icici"  //Mandatory to register UPI mandate
           "debitStartDate": "26-03-2021",
           "debitEndDate": "24-06-2021",
           "maxAmount": "100",
           "amountType": "M",
           "frequency": "MNTH"    //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN, ADHO and OT(OT option is available only if one time mandate mode is configured with merchant id)
           "debitRule": "ON",
           "debitDay": "12",
           "mandateRegType": "create", //mandate registration type
       }
   }

UPI - OTM

 * UPI OTM is available on the lines of Auth and Capture wherein merchant can
   block the funds of the end customer upto a specific period.
 * This use case is applicable for payment on delivery kind of services.
 * Max period is 90 days after which the mandate stands cancelled and the funds
   will be released to the customer.

   {
       "features": {
           "enableExpressPay": true,
           "siDetailsAtMerchantEnd": true,
           "enableInlineAutoDebit": false
           "enableSI": true
       },
       "consumerData": {
           "paymentMode": "UPI",
           "consumerId": "c96463452",
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "vpa": "",
           "accountType": "",
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-06-2021",
           "maxAmount": "",
           "amountType": "M",
           "frequency": "OT", //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN, ADHO and OT(OT option is available only if one time mandate mode is configured with merchant id)
           "debitDay": "0",
           "debitRule": "NA",
           "mandateRegType": "create", //mandate registration type
       }
   }

AUTH - OTM

 * Will consist of 2 flows/transaction wherein one would be to register the
   mandate and 2nd would be the debit the transaction as and when required post
   delivery of services. One the mandate is registered as OTM, customers fund
   would be blocked(not debited) and will not be debited or released until
   capture or Void call is made.
 * Note - Max 90 days. Post which funds will be unblocked from customers account
   and merchant will not be able to debit

   {
       "features": {
           "enableExpressPay": true,
           "siDetailsAtMerchantEnd": true,
           "enableSI": true
       },
       "consumerData": {
           "paymentMode": "UPI",
           "consumerId": "c96463452",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "vpa": "",
           "accountType": "",
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-06-2021",
           "maxAmount": "",
           "amountType": "M",
           "frequency": "OT", //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN, ADHO and OT(OT option is available only if one time mandate mode is configured with merchant id)
           "debitDay": "0",
           "debitRule": "NA",
           "mandateRegType": "create", //mandate registration type
           "txnType": "AUTH"
       }
   }

CAPTURE - OTM

 * To debit the transaction from the end customer refer the following call. This
   can be called as and when post registering a mandate as OTM

   {
       "features": {
           "enableExpressPay": true,
           "siDetailsAtMerchantEnd": true,
           "enableSI": true
       },
       "consumerData": {
           "paymentMode": "UPI",
           "consumerId": "c96463452",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "txnType": "CAPTURE",
           "PGtxnId": "859662365"
       }
   }

VOID - OTM

 * To cancel the OTM registration

   {
       "features": {
           "enableExpressPay": true,
           "siDetailsAtMerchantEnd": true,
           "enableSI": true
       },
       "consumerData": {
       "paymentMode": "UPI",
       "consumerId": "c96463452",
       "txnId": "148111515", //Unique merchant transaction ID
       "items": [{
           "itemId": "first",
           "amount": "1",
           "comAmt": "0"
       }],
       "txnType": "VOID",
       "PGtxnId": "859662365"
       }
   }


AVAILABLE PARAMETERS AND THEIR DEFAULT VALUES

{
    "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,
        "enableInlineAutoDebit": false
    },
    "consumerData": {
        "deviceId": "WEBSH2",
        "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": "",
        "debitRule": ""
    }
}


MANDATE VERIFICATION

Note:- This is a mandatory API which should be used to fetch the status of the
mandate. Mandate verification API cannot be for dual verification. It is only
used to check the status of the mandates for which status / online response is
not received at merchant end. Even for using the mandate verification, we
suggest the merchant to keep a time gap of upto 1 hour for mandate verification
or do verification for all pending cases on T+1 since there can be a case where
Worldline has not received real time response and we fetch from banks / NPCI
which can take upto 1 hour.

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for mandate verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during registration
consumer.identifier This is the consumer ID that is passed in the initial
request transaction.dateTime This is the date when the transaction date time in
"DD-MM-YYYY" format transaction.type This should be "002" transaction.subType
This should be "002" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {}
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889655",
    "dateTime": "17-01-2018",
    "subType": "002",
    "requestType": "TSI"
  },
  "consumer": {
    "identifier": "c90001008"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.token Mandate registration number
paymentMethod.paymentTransaction.statusCode This will be 0300 for Success, 0398
for Initiated and 0399 for Failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success and "F" in case of failure paymentMethod.error.code This is the error
code in case of failure paymentMethod.error.desc This is the error desc in case
of failure paymentMethod.paymentTransaction.bankReferenceIdentifier This is the
UMRN No


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889655",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "752410399",
        "instrumentAliasName": "",
        "instrumentToken": "123456",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "",
            "errorMessage": "Mandate Verification Successfull",
            "identifier": "439937277",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "Mandate Verification Successfull",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "",
            "desc": "Mandate Verification Successfull"
        }
    },
    "error": null
}







TRANSACTION SCHEDULING

Merchant will send the below JSON data with the Amount and debit date for
scheduling the transaction.

Post getting the request Worldline system will validate the data and then will
schedule the transaction. This scheduling request should be initiated before 2
days of the debit date.


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction scheduling.

API URL
https://www.paynimo.com/api/paynimoV2.req

 * There is a mandatory notification to be sent to customers on T-1 intimating
   them of the debit to happen(Pre Debit)
 * If the notification is not sent/received by the customer, the payer PSP can
   reject the transaction
 * Scheduling TAT is T-2.


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant for transaction scheduling
payment.instruction.identifier This is the unique mandate registration id sent
by Worldline system in successful mandate registration request
payment.instrument.identifier Pass the scheme code in this parameter
payment.instruction.amount Amount that need to be debitted
payment.instruction.endDateTime This is the date when the transaction need to be
debited in "DDMMYYYY" format transaction.type This should be "002"
transaction.subType This should be "003" transaction.requestType This should be
"TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instrument": {
      "identifier": "first"
    },
    "instruction": {
      "amount": "10",
      "endDateTime": "17012018",
      "identifier": "752410399"
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889656",
    "subType": "003",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.amount Amount that need to
be debitted paymentMethod.paymentTransaction.dateTime This is the date when the
transaction need to be debited in "DD-MM-YYYY" format
paymentMethod.paymentTransaction.identifier This is the unique Identifier
generated by Worldline system paymentMethod.paymentTransaction.statusMessage
This will be "S" in case of Success, "I" in case of Initiated and "F" in case of
failure paymentMethod.paymentTransaction.statusCode This will be "0300" in case
of Success, "0398" in case of Initiated and "0399" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.error.desc This is the error desc in case of failure


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889656",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "",
        "instrumentAliasName": "",
        "instrumentToken": "",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "10",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "17012018",
            "errorMessage": "Transaction scheduling request has been initiated",
            "identifier": "700000003426",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "I",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "S1006",
            "desc": "Transaction scheduling request has been initiated"
        }
    },
    "error": null
}


TRANSACTION VERIFICATION

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during transaction
scheduling transaction.dateTime This is the date when the transaction date time
in "DD-MM-YYYY" format transaction.type This should be "002" transaction.subType
This should be "004" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "002",
    "currency": "INR",
    "identifier": "1516163889656",
    "dateTime": "17-01-2018",
    "subType": "004",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.statusCode This will be
"0300" in case of Success and "0399" in case of failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success, "I" in case of Initiated and "F" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.error.desc This is the error desc in case of failure


SAMPLE RESPONSE

{
  "merchantCode": "L3348",
  "merchantTransactionIdentifier": "1516163889656",
  "merchantTransactionRequestType": "TSI",
  "responseType": "web",
  "transactionState": null,
  "paymentMethod": {
    "token": "",
    "instrumentAliasName": "",
    "instrumentToken": "",
    "bankSelectionCode": "",
    "aCS": null,
    "oTP": null,
    "paymentTransaction": {
      "amount": "",
      "balanceAmount": "",
      "bankReferenceIdentifier": "",
      "dateTime": "",
      "errorMessage": "",
      "identifier": "",
      "refundIdentifier": "",
      "statusCode": "0300",
      "statusMessage": "S",
      "instruction": null,
      "reference": null
    },
    "authentication": null,
    "error": {
      "code": "",
      "desc": ""
    }
  }
}


REGISTER A SI WITH WORLDLINE CHECKOUT

 * Create
 * Update / Modify
 * Delete / Revoke

Checkout is the best payment flow, on web and mobile. Checkout provides your
users with a streamlined, mobile-ready payment experience that is constantly
improving.


PARAMETERS IN CHECKOUT

Param name Description Datatype Example Mandatory / Conditional / Optional
deviceId This is the identifier for Hash Algorithm that need the used. Supported
deviceIdentifiers & algorithms are - WEBSH1(SHA-256 algorithm), WEBSH2(SHA-512
algorithm) Alphanumeric WEBSH2 Mandatory deviceId This is the identifier for
Hash Algorithm that need the used. Supported deviceIdentifiers & algorithms are
- ANDROIDSH1(SHA-256 algorithm), ANDROIDSH2(SHA-512 algorithm) Alphanumeric
ANDROIDSH2 Mandatory deviceId This is the identifier for Hash Algorithm that
need the used. Supported deviceIdentifiers & algorithms are - iOSSH1(SHA-256
algorithm), iOSSH2(SHA-512 algorithm) Alphanumeric iOSSH2 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 Worldline]

The last SALT will be the Key given by Worldline Hashing Algorithm will be 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
0b125f92d967e06135a7179d2d0a3a12e246dc0ae2b00ff018ebabbe747a4b5e47b5eb7583ec29ca0bb668348e1e2cd065d60f323943b9130138efba0cf109a9
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.jsp
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.jsp 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 cards), If Bank selection is at Worldline end then select all,
if bank selection at Merchant end then pass appropriate mode respective to
selected option char all Mandatory 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 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
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 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 Worldline. Alphanumeric T1234 Mandatory consumerId Consumer id
assigned by merchant, This is required if enableSI or enableExpressPay or
payWithSavedInstrument or enableInstrumentRegistration feature is enabled
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 items Product details

itemId : This is scheme code - its value will be shared by Worldline, Every
scheme code will be mapped with a account number at Worldline end where merchant
will receive payout
amount : Amount of each product in `
comAmt : Commission amount of each item in `.
array [{ "itemId" : "first", "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 cardNumber Card no entered by user to perform card
transaction. Number 4111********1111 Conditional expMonth Expiry Month entered
by user to perform card transaction. Number 09 Conditional expYear Expiry year
entered by user to perform card transaction. Number 2022 Conditional cvvCode CVV
code entered by user to perform card transaction. Number 123 Conditional
nameOnCard Name entered by user to perform card transaction. Alphanumeric test
user Conditional saveInstrument To vault instrument set true else set it false
Boolean false Conditional instrumentId If payment mode is cards or UPI then use
instrument token of registered instrument shared by Worldline Number 1234
Conditional debitStartDate It’s debit start date(dd-mm-yyyy). Required only for
SI registration. Number with special character allowed "-" 01-09-2016
Conditional debitEndDate It’s debit end date(dd-mm-yyyy). Required only for SI
registration. Number with special character allowed "-" 01-09-2046 Conditional
debitDay It’s debit day(01 to 31). Required only for SI registration id
enableDebitDay feature is enabled. Number 10 Conditional maxAmount It’s maximum
amount to be debited in `.Required only for SI registration. Number 200
Conditional amountType It’s amount type. Required only for SI registration.

Available options are as below:
M : Variable Amount
F : Fixed Amount

Alphabet M Conditional frequency Required only for SI 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


SI ON CARDS - CREATE


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" />

jQuery library 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.
    
    Checkout 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 SAVE & RUN 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">Register Now</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 reqJson = {
                        "features": {
                            "enableAbortResponse": true,
                            "enableNewWindowFlow": true,    //for hybrid applications please disable this by passing false
                            "enableExpressPay": true,
                            "enableMerTxnDetails": true,
                            "siDetailsAtMerchantEnd": true,
                            "enableSI": true
                        },
                        "consumerData": {
                            "deviceId": "WEBSH2", //possible values "WEBSH1" or "WEBSH2"
                            "token": "8cb644dd4a3c90cd2a55b5ea3182fb7354e08b17dbdc86a3114ff1f64bcb416eeff5a6d9a3b4fe2a194814c9114ac6f69f3d6e444a034d6cf32a7b3710d1e92e",
                            "returnUrl": "https://pgproxyuat.in.worldline-solutions.com/linuxsimulator/MerchantResponsePage.jsp",    //merchant response page URL
                            "responseHandler": handleResponse,
                            "paymentMode": "cards",
                            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
                            "merchantId": "L3348",
                            "currency": "INR",
                            "consumerId": "c964634", //Your unique consumer identifier to register a SI
                            "consumerMobileNo": "9876543210",
                            "consumerEmailId": "test@test.com",
                            "txnId": "1703166429880",   //Unique merchant transaction ID
                            "items": [{ "itemId" : "first", "amount" : "5", "comAmt": "0"}],
                            "customStyle": {
                                "PRIMARY_COLOR_CODE": "#45beaa",   //merchant primary color code
                                "SECONDARY_COLOR_CODE": "#FFFFFF",   //provide merchant's suitable color code
                                "BUTTON_COLOR_CODE_1": "#2d8c8c",   //merchant's button background color code
                                "BUTTON_COLOR_CODE_2": "#FFFFFF"   //provide merchant's suitable color code for button text
                            },
                            "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(reqJson);
                    if(reqJson.features.enableNewWindowFlow){
                        pnCheckoutShared.openNewWindow();
                    }
    
                });
            });
        </script>
    </body>
    
    </html>
    
    LIVE CODE PREVIEW

 3. We will send response using post method in msg key on provided returnUrl.
    You need to capture msg key’s value which will be in pipe(|) separated
    format as mentioned below:
    
    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 checkout initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.


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.

Following is the initial requirement to integrate Checkout SDK in your Android
application:

Minimum Required SDK API 21(Lollipop Version) Target SDK API 33(Android13)
Compiled With API 33(Android13)

 1. Download weipl_checkout aar file into module’s libs
    
    weipl_checkout.aar

 2. Include below lines in dependencies section of module’s build.gradle file:
    
    implementation "androidx.appcompat:appcompat:1.4.2"
    implementation "androidx.constraintlayout:constraintlayout:2.1.2"
    implementation "com.android.volley:volley:1.2.1"
                   
    implementation files("libs/weipl_checkout.aar")

 3. Import WLCheckoutActivity as follows to invoke Checkout
    
    import com.weipl.checkout.WLCheckoutActivity;
    

 4. You have to call preloadData() method and set listener in calling activity’s
    onCreate() method so that SDKs dependecy files will be preloaded & available
    at the time of checkout.
    
    WLCheckoutActivity.setPaymentResponseListener(this);
    WLCheckoutActivity.preloadData(applicationContext);

 5. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    JSONObject reqJson = new JSONObject();
    
    JSONObject jsonFeatures = new JSONObject();
    jsonFeatures.put("enableAbortResponse", true);
    jsonFeatures.put("enableExpressPay", true);
    jsonFeatures.put("enableMerTxnDetails", true);
    jsonFeatures.put("siDetailsAtMerchantEnd", true);
    jsonFeatures.put("enableSI", true);
    reqJson.put("features", jsonFeatures);
    
    JSONObject jsonConsumerData = new JSONObject();
    jsonConsumerData.put("deviceId", "AndroidSH2");        //possible values "AndroidSH1" or "AndroidSH2"
    jsonConsumerData.put("token", "37b0b9dd68cceafdf8dd38142803c0babc7073c3042547dc6060660ba50ac5cd043ddf0a27bdcbddc2cab2a0a28cbf51b30ecc2176e617304745f825655b1ff9");
    jsonConsumerData.put("paymentMode", "cards");
    jsonConsumerData.put("merchantLogoUrl","https://www.paynimo.com/CompanyDocs/company-logo-vertical.png");
    jsonConsumerData.put("merchantId","L3348");
    jsonConsumerData.put("currency","INR");
    jsonConsumerData.put("consumerId","c964634");
    jsonConsumerData.put("consumerMobileNo","9876543210");
    jsonConsumerData.put("consumerEmailId","test@test.com");
    jsonConsumerData.put("txnId", "1481197581115");
    JSONArray jArrayItems = new JSONArray();
    JSONObject jsonItem1 = new JSONObject();
    jsonItem1.put("itemId", "first");
    jsonItem1.put("amount", "5");
    jsonItem1.put("comAmt", "0");
    jArrayItems.put(jsonItem1);
    jsonConsumerData.put("items", jArrayItems);
    JSONObject jsonCustomStyle = new JSONObject();
    jsonCustomStyle.put("PRIMARY_COLOR_CODE", "#45beaa");
    jsonCustomStyle.put("SECONDARY_COLOR_CODE", "#ffffff");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_1", "#2d8c8c");
    jsonCustomStyle.put("BUTTON_COLOR_CODE_2", "#ffffff");
    jsonConsumerData.put("customStyle",jsonCustomStyle);
    jsonConsumerData.put("debitStartDate", "10-03-2019");
    jsonConsumerData.put("debitEndDate", "01-03-2047");
    jsonConsumerData.put("maxAmount", "100");
    jsonConsumerData.put("amountType", "M");
    jsonConsumerData.put("frequency", "ADHO");    //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
    
    reqJson.put("consumerData", jsonConsumerData);
    
    WLCheckoutActivity.open(currentContext, reqJson);    //currentContext will be current activity context

 6. Getting response Back from WLCheckoutActivity in merchant's Activity
    
    @override 
    public void wlCheckoutPaymentResponse(JSONObject response) {
        Log.d("In wlCheckoutPaymentResponse()", response.toString());
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @override 
    public void wlCheckoutPaymentError(JSONObject response) {
        Log.d("In wlCheckoutPaymentError()", response.toString());
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.


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.

 1. import checkout SDK class
    
    import weipl_checkout

 2. Declare WLCheckout Class variable:
    
    var WLCheckout : WLCheckoutViewController?

 3. You have to call preloadData() inside viewDidLoad() method so that SDKs
    dependecy files will be preloaded & available at the time of checkout.
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentResponse(result:)), name: Notification.Name("wlCheckoutPaymentResponse"), object: nil)
    
    NotificationCenter.default.addObserver(self, selector: #selector(self.wlCheckoutPaymentError(result:)), name: Notification.Name("wlCheckoutPaymentError"), object: nil)
    
    WLCheckout = WLCheckoutViewController()
    WLCheckout?.preloadData()

 4. Initialize Checkout on click of pay button and your initialisation will be
    as below,
    
    let reqJson : [String:Any] = [
        "features" : [
            "enableAbortResponse": true,
            "enableExpressPay": true,
            "enableMerTxnDetails": true
            "siDetailsAtMerchantEnd": true,
            "enableSI": true
        ],
        "consumerData": [
            "deviceId": "iOSSH2",    //possible values "iOSSH1" or "iOSSH2"
            "token": "37b0b9dd68cceafdf8dd38142803c0babc7073c3042547dc6060660ba50ac5cd043ddf0a27bdcbddc2cab2a0a28cbf51b30ecc2176e617304745f825655b1ff9",
            "paymentMode": "cards",
            "merchantLogoUrl": "https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",  //provided merchant logo will be displayed
            "merchantId": "L3348",
            "currency": "INR",
            "consumerId": "c964634",
            "consumerMobileNo": "9876543210",
            "consumerEmailId": "test@test.com",
            "txnId": "1481197581115",   //Unique merchant transaction ID
            "items": [[
                "itemId": "first",
                "amount": "5",
                "comAmt": "0"
            ]],
            "customStyle": [
                "PRIMARY_COLOR_CODE": "#45beaa",    // RGB and Hex and RGB supported parameter
                "SECONDARY_COLOR_CODE": "#ffffff",
                "BUTTON_COLOR_CODE_1": "#2d8c8c",
                "BUTTON_COLOR_CODE_2": "#ffffff",
            ],
            "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
        ]
    ]
    
    do {
       let jSONObject = String(data: try JSONSerialization.data(withJSONObject: reqJson, options: .prettyPrinted), encoding: String.Encoding(rawValue: NSUTF8StringEncoding))
       WLCheckout!.open(requestObj: jSONObject!)
       DispatchQueue.main.async{
          self.present(self.WLCheckout!, animated: true, completion: nil)
       }
    } catch _ as NSError {
       
    }

 5. Getting response Back from WLCheckoutViewController in merchant's
    ViewController
    
    @objc func wlCheckoutPaymentResponse(result: Notification) {
        print("\(result.object!)")
    }
    
    Sample response format after transaction completion will be:
    
    {
        "msg": "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_code": "L3348"
    }
    
    Where merchant need to capture msg from above given sample response and then
    calculate the hash using the same algorithm used at the time of checkout
    initialisation 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 HASH need to match with HASH value which
    is provided from Worldline in response for dual verification.
    
    If HASH in response and HASH created at your end matched then respective
    Success/Failure acknowledgement need be shown to end customer and update
    status of transaction in merchant’s DB as well. If HASH is not getting
    matched, failure acknowledgement screen with technical error can be
    displayed.
    
    txn_status value will 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.
    
    @objc func wlCheckoutPaymentError(result: Notification) {
        print("\(result.object!)")
    }
    
    In response, you will get error_code and error_desc which you can display to
    user. We will provide response in this method only in case of non payment
    errors.

 6. Plist specific changes
    
    Add required UPI intent calling and process data in background permissions
    in plist file
    
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>phonepe</string>
        <string>gpay</string>
        <string>paytm</string>
    </array>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>processing</string>
    </array>
    
    

Xcode Setup

 1. Set Minimum Target version : 12.0
 2. Direct Integration Setup
    * Download latest release of weipl_checkout.xcframework.zip & drag
      .xcframework in "Framework, libraries, and Embedded content" and set
      "Embed & Sign" option.
 3. For CocoaPod Setup
    * Visit CocoaPod for our SDK installation in your project.
 4. For Swift Package Manager Setup
    * To add weipl_checkout package dependency to your Xcode project, select
      File > Swift Packages > Add Package Dependency and enter
      https://github.com/Worldline-ePayments-India/weipl-checkout-ios.git.
    * You can also navigate to your target's General pane, and in the
      "Frameworks, Libraries, and Embedded Content" section, click the + button,
      select Add Other, and choose Add Package Dependency.

--------------------------------------------------------------------------------


CONFIGURATION OPTIONS

Note: All features and provided options are needs to be added in existing
request options as per your features need.

Option Description 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
hideSavedInstruments It’s false by default, after enabling this feature checkout
hides saved payment options even in case of enableExpressPay is enabled.
payDetailsAtMerchantEnd It’s false by default. If Selected Bank code, Account
Number are captured from merchant end to register SI then enable this flag by
passing value true during checkout initialization in below manner.


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "cards",
        "cardNumber": "4111********1111",  //Captured Card number
        "expMonth": "09",  //Captured Card Expiry month
        "expYear": "2023",  //Captured Card Expiry year
        "cvvCode": "123",  //Captured CVV(if not captured at merchant end skip this code, checkout will prompt for CVV)
        "nameOnCard": "test user",  //Name on card
        "saveInstrument": true  //mandatory to register SI
    }
}

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 SI 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 SI details are captured in
checkout.


debitStartDate, debitEndDate, maxAmount, amountType , frequency


{
    "features": {
        "enableExpressPay": true,
        "enableSI": true,
        "payDetailsAtMerchantEnd": true,
        "siDetailsAtMerchantEnd": true
    },
    "consumerData": {
        "paymentMode": "cards",
        "cardNumber": "4111********1111",  //Captured Card number
        "expMonth": "09",  //Captured Card Expiry month
        "expYear": "2023",  //Captured Card Expiry year
        "cvvCode": "123",  //Captured CVV(if not captured at merchant end skip this code, checkout will prompt for CVV)
        "nameOnCard": "test user",  //Name on card
        "saveInstrument": true,  //mandatory to register SI
        "debitStartDate": "01-01-2019",
        "debitEndDate": "01-01-2046",
        "maxAmount": "100",
        "amountType": "M",
        "frequency": "MNTH" //  Available options DAIL, WEEK, MNTH, QURT, MIAN, YEAR, BIMN and ADHO
    }
}

hideSIDetails It’s false by default, To enable this feature set hideSIDetails
and siDetailsAtMerchantEnd value to true. If this flag is enabled and all SI
details provided from merchant end then SI details are not visible to customer
in checkout. enableDebitDay It’s false by default, to accept debit day value
during SI registration merchant need to enable this feature during checkout
initialization. expandSIDetails It’s false by default, after enabling this
feature checkout shows SI details in expanded mode by default.
enableTxnForNonSICards It’s false by default, After enabling this feature
Checkout prompt a message to end customer so that customer can proceed with a
normal transaction with same card details if entered card is not supported for
SI transactions. showSIConfirmation It’s false by default, if SI details
captures from merchant end then checkout redirects customer to OTP/3D-Secure
page. To show confirmation screen for registration pass this flag value as true.
showSIResponseMsg It’s false by default, this flag is enabled checkout shows SI
registrations details also in final checkout response on return page.

SI on Cards - Modify

 * Mandates can be modified by passing the relevant Mandate ID
 * Only End Date and Amount can be changed during modify mandate
 * Payer needs to authorize the modification in the mandate by Card 2FA
 * Need to pass consumer identifier in consumerId, mandate registration type in
   mandateRegType = 'update' and mandate Id in mandateId

   {
       "features": {
           "enableExpressPay": true,
           "enableSI": true,
           "payDetailsAtMerchantEnd": false,
           "siDetailsAtMerchantEnd": true
       },
       "consumerData": {
           "paymentMode": "cards",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "10",
               "comAmt": "0"
           }],
           "consumerId": "c964634", //consumer identifier used at the time of registration
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-03-2051",
           "maxAmount": "100",
           "amountType": "M",
           "frequency": "ADHO",
           "debitDay": "0",
           "debitRule": "NA"
           "mandateRegType": "update", //mandate registration type
           "mandateId": "725639" //mandate Id
       }
   }

SI on Cards - Revoke

 * Mandate once revoked can"t be undone.
 * On a revoked mandate no further executions can be done
 * If the Revoke is initiated by Payee there is no Card 2FA required
 * Need to pass consumer identifier in consumerId, mandate registration type in
   mandateRegType = 'delete' and mandate Id in mandateId

   {
       "features": {
           "enableExpressPay": true,
           "enableSI": true,
           "payDetailsAtMerchantEnd": false,
           "siDetailsAtMerchantEnd": true
       },
       "consumerData": {
           "paymentMode": "cards",
           "txnId": "148111515", //Unique merchant transaction ID
           "items": [{
               "itemId": "first",
               "amount": "1",
               "comAmt": "0"
           }],
           "consumerId": "c964634", //consumer identifier used at the time of registration
           "debitStartDate": "26-03-2021",
           "debitEndDate": "01-03-2051",
           "maxAmount": "100",
           "amountType": "M",
           "frequency": "ADHO",
           "debitDay": "0",
           "debitRule": "NA"
           "mandateRegType": "delete", //mandate registration type
           "mandateId": "725639" //mandate Id
       }
   }


AVAILABLE PARAMETERS AND THEIR DEFAULT VALUES

{
    "features": {
        "showLoader": true,
        "showPGResponseMsg": true,
        "enableAbortResponse": true,
        "showDownloadReceipt": true,
        "enableNewWindowFlow": false,
        "payDetailsAtMerchantEnd": false,
        "payWithSavedInstrument": false,
        "enableExpressPay": false,
        "hideSavedInstruments": false,
        "enableSI": false,
        "siDetailsAtMerchantEnd": false,
        "showSIConfirmation": false,
        "expandSIDetails": false,
        "enableDebitDay": false,
        "showSIResponseMsg": false,
        "enableTxnForNonSICards": false,
        "separateCardMode": false
    },
    "consumerData": {
        "deviceId": "WEBSH2",
        "token": "",
        "returnUrl": "",
        "payOptionsHandler": "",
        "responseHandler": "",
        "responseStr": "",
        "paymentMode": "all",
        "checkoutElement": "",
        "merchantLogoUrl": "",
        "merchantMsg": "",
        "disclaimerMsg": "",
        "siLabelText": "",
        "merchantId": "",
        "consumerId": "",
        "consumerMobileNo": "",
        "consumerEmailId": "",
        "txnId": "",
        "txnType": "SALE",
        "txnSubType": "DEBIT",
        "items": [],
        "cartDescription": "",
        "cardNumber": "",
        "expMonth": "",
        "expYear": "",
        "cvvCode": "",
        "nameOnCard": "",
        "saveInstrument": false,
        "regMobNo": "",
        "instrumentId": "",
        "instrumentAlias": "",
        "instrumentNumber": "",
        "debitStartDate": "",
        "debitEndDate": "",
        "debitDay": "",
        "maxAmount": "",
        "amountType": "",
        "frequency": ""
    }
}


MANDATE VERIFICATION

Note:- This is a mandatory API which should be used to fetch the status of the
mandate. Mandate verification API cannot be for dual verification. It is only
used to check the status of the mandates for which status / online response is
not received at merchant end. Even for using the mandate verification, we
suggest the merchant to keep a time gap of upto 1 hour for mandate verification
or do verification for all pending cases on T+1 since there can be a case where
Worldline has not received real time response and we fetch from banks / NPCI
which can take upto 1 hour.

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for mandate verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during registration
consumer.identifier This is the consumer ID that is passed in the initial
request transaction.dateTime This is the date when the transaction date time in
"DD-MM-YYYY" format transaction.type This should be "001" transaction.subType
This should be "002" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {}
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "001",
    "currency": "INR",
    "identifier": "1516163889655",
    "dateTime": "17-01-2018",
    "subType": "002",
    "requestType": "TSI"
  },
  "consumer": {
    "identifier": "c90001008"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.token Mandate registration number
paymentMethod.paymentTransaction.statusCode This will be 0300 for Success, 0398
for Initiated and 0399 for Failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success and "F" in case of failure paymentMethod.error.code This is the error
code in case of failure paymentMethod.error.desc This is the error desc in case
of failure


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889655",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "752410399",
        "instrumentAliasName": "",
        "instrumentToken": "123456",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "",
            "errorMessage": "Mandate Verification Successfull",
            "identifier": "439937277",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "Mandate Verification Successfull",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "",
            "desc": "Mandate Verification Successfull"
        }
    },
    "error": null
}


TRANSACTION SCHEDULING

Merchant will send the below JSON data with the Amount and debit date for
scheduling the transaction.

Post getting the request Worldline system will validate the data and then will
schedule the transaction. This scheduling request should be initiated before 2
days of the debit date


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction scheduling.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant for transaction scheduling
payment.instruction.identifier This is the unique mandate registration id sent
by Worldline system in successful mandate registration request
payment.instrument.identifier Pass the scheme code in this parameter
payment.instruction.amount Amount that need to be debitted
payment.instruction.endDateTime This is the date when the transaction need to be
debited in "DDMMYYYY" format.
If debit need to be happen on same day then please pass debit day here after
post configuration(please contact support team for assistance) OR else you can
schedule the transaction. transaction.type This should be "001"
transaction.subType This should be "003" transaction.requestType This should be
"TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instrument": {
      "identifier": "first"
    },
    "instruction": {
      "amount": "10",
      "endDateTime": "17012018",
      "identifier": "752410399"
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "001",
    "currency": "INR",
    "identifier": "1516163889656",
    "subType": "003",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.amount Amount that need to
be debitted paymentMethod.paymentTransaction.dateTime This is the date when the
transaction need to be debited in "DD-MM-YYYY" format
paymentMethod.paymentTransaction.identifier This is the unique Identifier
generated by Worldline system paymentMethod.paymentTransaction.statusMessage
This will be "S" in case of Success, "I" in case of Initiated and "F" in case of
failure paymentMethod.paymentTransaction.statusCode This will be "0300" in case
of Success, "0398" in case of Initiated and "0399" in case of failure

Merchant can consider both Response statusCode’s 0300 and 0398 as successful
logging of Txn (Status Msg can be ignored for these statusCode while doing
Scheduling) paymentMethod.error.code This is the error code in case of failure
paymentMethod.error.desc This is the error desc in case of failure


SAMPLE RESPONSE

{
    "merchantCode": "L3348",
    "merchantTransactionIdentifier": "1516163889656",
    "merchantTransactionRequestType": "TSI",
    "responseType": "web",
    "transactionState": null,
    "merchantAdditionalDetails": null,
    "paymentMethod": {
        "token": "",
        "instrumentAliasName": "",
        "instrumentToken": "",
        "bankSelectionCode": "",
        "aCS": null,
        "oTP": null,
        "paymentTransaction": {
            "amount": "10",
            "balanceAmount": "",
            "bankReferenceIdentifier": "",
            "dateTime": "17012018",
            "errorMessage": "Transaction scheduling request has been initiated",
            "identifier": "700000003426",
            "refundIdentifier": "",
            "statusCode": "0300",
            "statusMessage": "I",
            "instruction": null,
            "reference": null,
            "accountNo": null
        },
        "authentication": null,
        "error": {
            "code": "S1006",
            "desc": "Transaction scheduling request has been initiated"
        }
    },
    "error": null
}


TRANSACTION VERIFICATION

Merchant will send the below JSON data with his unique ID for knowing the status
of the transaction.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for transaction verification.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant and sent during transaction
scheduling transaction.dateTime This is the date when the transaction date time
in "DD-MM-YYYY" format transaction.type This should be "001" transaction.subType
This should be "004" transaction.requestType This should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "identifier": "L3348"
  },
  "payment": {
    "instruction": {
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "type": "001",
    "currency": "INR",
    "identifier": "1516163889656",
    "dateTime": "17-01-2018",
    "subType": "004",
    "requestType": "TSI"
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the unique
ID generated by the merchant and sent in request. merchantTransactionRequestType
This will be "TSI" paymentMethod.paymentTransaction.statusCode This will be
"0300" in case of Success and "0399" in case of failure

Merchant needs to consider statusCode - "0300" and statusMessage - "S" (This
implies that the debit is done from customer)

In case of statusCode - "0300" and statusMessage - "I" (This implies that bank’s
response/debit confirmation is pending) - Merchant can reverify status for these
txn’s. suggested TAT - T+3. If the statusMessage on T+3 is still "I" can be
considered as "Failed" paymentMethod.paymentTransaction.statusMessage This will
be "S" in case of Success, "I" in case of Initiated and "F" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.paymentTransaction.errorMessage This is the error desc in case of
failure


SAMPLE RESPONSE

{
  "merchantCode": "L3348",
  "merchantTransactionIdentifier": "1516163889656",
  "merchantTransactionRequestType": "TSI",
  "responseType": "web",
  "transactionState": null,
  "paymentMethod": {
    "token": "",
    "instrumentAliasName": "",
    "instrumentToken": "",
    "bankSelectionCode": "",
    "aCS": null,
    "oTP": null,
    "paymentTransaction": {
      "amount": "",
      "balanceAmount": "",
      "bankReferenceIdentifier": "",
      "dateTime": "",
      "errorMessage": "",
      "identifier": "",
      "refundIdentifier": "",
      "statusCode": "0300",
      "statusMessage": "S",
      "instruction": null,
      "reference": null
    },
    "authentication": null,
    "error": {
      "code": "",
      "desc": "Transaction Verification Success"
    }
  }
}


MANDATE DEACTIVATION

Merchant will send the below JSON data with the Instruction ID for Mandate
Deactivation.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for mandate de-activation.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant for tracking transaction.Token Pass
the Instruction ID / Mandate ID in this parameter transaction.type This should
be "001" transaction.subType This should be "005" transaction.requestType This
should be "TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "webhookEndpointURL": "",
    "responseType": "",
    "responseEndpointURL": "",
    "description": "",
    "identifier": "L95279",
    "webhookType": ""
  },
  "cart": {
    "item": [
      {
        "description": "",
        "providerIdentifier": "",
        "surchargeOrDiscountAmount": "",
        "amount": "",
        "comAmt": "",
        "sKU": "",
        "reference": "",
        "identifier": ""
      }
    ],
    "reference": "",
    "identifier": "",
    "description": "",
    "Amount": ""
  },
  "payment": {
    "method": {
      "token": "",
      "type": ""
    },
    "instrument": {
      "expiry": {
        "year": "",
        "month": "",
        "dateTime": ""
      },
      "provider": "",
      "iFSC": "",
      "holder": {
        "name": "",
        "address": {
          "country": "",
          "street": "",
          "state": "",
          "city": "",
          "zipCode": "",
          "county": ""
        }
      },
      "bIC": "",
      "type": "",
      "action": "",
      "mICR": "",
      "verificationCode": "",
      "iBAN": "",
      "processor": "",
      "issuance": {
        "year": "",
        "month": "",
        "dateTime": ""
      },
      "alias": "",
      "identifier": "",
      "token": "",
      "authentication": {
        "token": "",
        "type": "",
        "subType": ""
      },
      "subType": "",
      "issuer": "",
      "acquirer": ""
    },
    "instruction": {
      "occurrence": "",
      "amount": "",
      "frequency": "",
      "type": "",
      "description": "",
      "action": "",
      "limit": "",
      "endDateTime": "",
      "identifier": "",
      "reference": "",
      "startDateTime": "",
      "validity": ""
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "smsSending": "",
    "amount": "",
    "forced3DSCall ": "",
    "type": "001",
    "description": "",
    "currency": "INR",
    "isRegistration": "",
    "identifier": "",
    "dateTime": "",
    "token": 761582872,
    "securityToken": "",
    "subType": "005",
    "requestType": "TSI",
    "reference": "",
    "merchantInitiated": "",
    "merchantRefNo": ""
  },
  "consumer": {
    "mobileNumber": "",
    "emailID": "",
    "identifier": "",
    "accountNo": ""
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. paymentMethod.paymentTransaction.statusCode This
will be 0300 for success and 0399 for Failure
paymentMethod.paymentTransaction.statusMessage This will be "S" in case of
Success and "F" in case of failure paymentMethod.error.code This is the error
code in case of failure paymentMethod.error.desc This is the error desc in case
of failure


SAMPLE RESPONSE

{
  "merchantCode": "L95279",
  "merchantTransactionIdentifier": "",
  "merchantTransactionRequestType": "TSI",
  "responseType": "web",
  "transactionState": null,
  "paymentMethod": {
    "token": "",
    "instrumentAliasName": "",
    "instrumentToken": "",
    "bankSelectionCode": "",
    "aCS": null,
    "oTP": null,
    "paymentTransaction": {
      "amount": "",
      "balanceAmount": "",
      "bankReferenceIdentifier": "",
      "dateTime": "",
      "errorMessage": "Mandate is already deactivated",
      "identifier": "",
      "refundIdentifier": "",
      "statusCode": "0399",
      "statusMessage": "F",
      "instruction": null,
      "reference": null
    },
    "authentication": null,
    "error": {
      "code": "S1004",
      "desc": "Mandate is already deactivated"
    }
  }
}


STOP PAYMENT

Merchant will send the below JSON data with the transaction ID given in response
of Transaction scheduling.

Post getting the request Worldline system will validate the data and then will
respond accordingly.


REQUEST PARAMETERS

Below are the parameters that need to be passed for stop payment.

API URL
https://www.paynimo.com/api/paynimoV2.req


MANDATORY PARAMETERS

Parameter name Parameter Desc merchant.identifier This is the Merchant
identifier as provided by Worldline System. transaction.deviceIdentifier This
will be "S" as this will be Server to server call. transaction.identifier This
is the unique ID generated by the merchant for tracking transaction.Token Pass
the transaction ID in this parameter transaction.type This should be "001"
transaction.subType This should be "006" transaction.requestType This should be
"TSI"


JSON FORMAT IN WHICH DATA NEED TO BE SENT

{
  "merchant": {
    "webhookEndpointURL": "",
    "responseType": "",
    "responseEndpointURL": "",
    "description": "",
    "identifier": "L95279",
    "webhookType": ""
  },
  "cart": {
    "item": [
      {
        "description": "",
        "providerIdentifier": "",
        "surchargeOrDiscountAmount": "",
        "amount": "",
        "comAmt": "",
        "sKU": "",
        "reference": "",
        "identifier": ""
      }
    ],
    "reference": "",
    "identifier": "",
    "description": "",
    "Amount": ""
  },
  "payment": {
    "method": {
      "token": "",
      "type": ""
    },
    "instrument": {
      "expiry": {
        "year": "",
        "month": "",
        "dateTime": ""
      },
      "provider": "",
      "iFSC": "",
      "holder": {
        "name": "",
        "address": {
          "country": "",
          "street": "",
          "state": "",
          "city": "",
          "zipCode": "",
          "county": ""
        }
      },
      "bIC": "",
      "type": "",
      "action": "",
      "mICR": "",
      "verificationCode": "",
      "iBAN": "",
      "processor": "",
      "issuance": {
        "year": "",
        "month": "",
        "dateTime": ""
      },
      "alias": "",
      "identifier": "first",
      "token": "",
      "authentication": {
        "token": "",
        "type": "",
        "subType": ""
      },
      "subType": "",
      "issuer": "",
      "acquirer": ""
    },
    "instruction": {
      "occurrence": "",
      "amount": "11",
      "frequency": "",
      "type": "",
      "description": "",
      "action": "",
      "limit": "",
      "endDateTime": "",
      "identifier": "",
      "reference": "",
      "startDateTime": "",
      "validity": ""
    }
  },
  "transaction": {
    "deviceIdentifier": "S",
    "smsSending": "",
    "amount": "",
    "forced3DSCall ": "",
    "type": "001",
    "description": "",
    "currency": "INR",
    "isRegistration": "",
    "identifier": "m14",
    "dateTime": "",
    "token": "700000000001",
    "securityToken": "",
    "subType": "006",
    "requestType": "TSI",
    "reference": "",
    "merchantInitiated": "",
    "merchantRefNo": ""
  },
  "consumer": {
    "mobileNumber": "",
    "emailID": "",
    "identifier": "",
    "accountNo": ""
  }
}


RESPONSE PARAMETERS

Parameter name Parameter Desc merchantCode This is the Merchant identifier as
provided by Worldline System. merchantTransactionIdentifier This is the Merchant
Identifier passed by the merchant to track the request
paymentMethod.paymentTransaction.statusCode This will be 0300 for success and
0399 for Failure paymentMethod.paymentTransaction.statusMessage This will be "D"
in case of successfully initiated and "F" in case of failure
paymentMethod.error.code This is the error code in case of failure
paymentMethod.error.desc This is the error desc in case of failure


SAMPLE RESPONSE

{
  "merchantCode": "L95279",
  "merchantTransactionIdentifier": "m14",
  "merchantTransactionRequestType": "TSI",
  "responseType": "web",
  "transactionState": null,
  "paymentMethod": {
    "token": "",
    "instrumentAliasName": "",
    "instrumentToken": "",
    "bankSelectionCode": "",
    "aCS": null,
    "oTP": null,
    "paymentTransaction": {
      "amount": "11",
      "balanceAmount": "",
      "bankReferenceIdentifier": "",
      "dateTime": "",
      "errorMessage": "",
      "identifier": "",
      "refundIdentifier": "",
      "statusCode": "0300",
      "statusMessage": "D",
      "instruction": null,
      "reference": null
    },
    "authentication": null,
    "error": {
      "code": "S1006",
      "desc": "Stop Payment request has been initiated"
    }
  }
}


INTRODUCTION


1.1 DOCUMENT PURPOSE

The purpose of this document is to explain the Functional & Technical flow of
the Bank Performance Indicator Service provide by Worldline to Merchants.


1.2 BUSINESS OBJECTIVE

Worldline provides a Service to its merchants, wherein merchants can pull the
real time bank performance Indicator (only for their respective configured
net-banking banks) from Worldline, every 5 minutes so as know the each bank’s
performance on timely basis.


FUNCTIONAL FLOW

 * Worldline to provide a service to the merchants, who can pull the Bank’s
   Performance Indicator from Worldline.
 * This Service is only available for the respective Net-banking Banks
   configured to that particular merchant.
 * Merchant can pull the Bank’s Performance Indicator for every 5 mins through
   this service.
 * Within this service, Worldline have two different methods i.e. Performance
   Indicator Service for all banks (or) Particular Bank.
   


 * METHOD 1 -PERFORMANCE INDICATOR SERVICE FOR ALL BANKS
   
   Through this method merchant can pull the Performance of all the Banks.
   
   Merchant needs to pass on the parameters (mentioned in technical Doc) so as
   to pull the Performance Indicator of all Banks.


 * METHOD 2 -PERFORMANCE INDICATOR SERVICE FOR A PARTICULAR BANK
   
   Through this method merchant can pull the Performance of the required bank
   only.
   
   Merchant needs to pass on the parameters (mentioned in technical Doc) so as
   to pull the Performance Indicator of all Banks.

 * Once the Merchant calls the Service, Worldline will return the Bank
   Performance Indicators as GREEN, YELLOW and RED. Explanation of each response
   as below :-
   
   GREEN :- Up and running. Success ratio is above the threshold limit
   YELLOW :- Partially Down. Success ratio is below the threshold limit
   RED :- Completely Down


TECHNICAL DETAILS

Dummy Merchant details
Merchant Code :- T0000
Encryption key:- ABC1234567
Encryption IV:- ABC1234567
Bank Code:- 99990

Note:-
Merchant Code, Encryption key and Encryption IV this should be alphanumeric and
provided by Worldline.
Bank Code should be numeric and provided by Worldline.

Web Service (WSDl) URL
https://www.tpsl-india.in/GatewayService/services/BankPerformanceAlertService


 * METHOD 1 -PERFORMANCE INDICATOR SERVICE FOR ALL BANKS
   
   * This method takes three parameters as mentioned below and sends response in
     xml format with all the bank alert flag (RED, GREEN, YELLOW) details.
     
     Parameter 1:- Merchant Code(T0000)
     Parameter 2:- Encryption key(ABC1234567)
     Parameter 3:- Encryption IV(ABC1234567)
   
   * Sample response format in case of success:-
     
     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <BankPerformanceDetails>
         <serviceCode>ERR000</serviceCode>
         <serviceResult>Records found</serviceResult>
         <bankAlertDetails>
             <bankCode>99990</bankCode>
             <bankDesc>DummyBank</bankDesc>
             <bankAlertFlag>RED</bankAlertFlag>
         </bankAlertDetails>
         <bankAlertDetails>
             <bankCode>99980</bankCode>
             <bankDesc>DummyBankGreen</bankDesc>
             <bankAlertFlag>GREEN</bankAlertFlag>
         </bankAlertDetails>
         <bankAlertDetails>
             <bankCode>99980</bankCode>
             <bankDesc>DummyBankYellow</bankDesc>
             <bankAlertFlag>YELLOW</bankAlertFlag>
         </bankAlertDetails>
     </BankPerformanceDetails>
   
   * Sample response format in validation fails with the system:-
     
     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <BankPerformanceDetails>
         <serviceCode>ERR007</serviceCode>
         <serviceResult>Parameter Mismatch</serviceResult>
     </BankPerformanceDetails>


 * METHOD 2 -PERFORMANCE INDICATOR SERVICE FOR A PARTICULAR BANK
   
   * This method takes four parameter as mentioned below and send response in
     xml format with specific bank alert flag (RED, GREEN, YELLOW) details.
     
     Parameter 1:- Merchant Code(T0000)
     Parameter 2:- Encryption key(ABC1234567)
     Parameter 3:- Encryption IV(ABC1234567)
     Parameter 4:- Bank Code(99990)
   
   * Sample response format in case of success:-
     
     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <BankPerformanceDetails>
         <serviceCode>ERR000</serviceCode>
         <serviceResult>Records found</serviceResult>
         <bankAlertDetails>
             <bankCode>99990</bankCode>
             <bankDesc>DummyBank</bankDesc>
             <bankAlertFlag>RED</bankAlertFlag>
         </bankAlertDetails>
     </BankPerformanceDetails>
   
   * Sample response format in validation fails with the system:-
     
     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <BankPerformanceDetails>
         <serviceCode>ERR007</serviceCode>
         <serviceResult>Parameter Mismatch</serviceResult>
     </BankPerformanceDetails>



WEB-SERVICE DESCRIPTION:-

Below is the description of the web-service tag . Our root tag

<BankPerformanceDetails>:- This is the XML root element.

<Service Code>-: This will be child element of xml root element i.e
"BankPerformanceDetails". It will show the response code of the web-service
request initiated by merchant

<serviceResult>:- This is description of the service code. This is also child
element of xml root element i.e "BankPerformanceDetails".

<bankAlertDetails>:- This will contains the actual bank details. But in
following scenario it will occur multiple times in response.

If the merchant have multiple net bank configured in Worldline System and also
merchant call 1-Method to fetch the bank performance details then this will be
exist multiple time in the web-service response.

<bankCode>:- This will be actual bank code.

<bankDesc>:- This will be the bank name.

<bankAlertFlag>:- this will be the bank performance alert as (RED, GREEN,
YELLOW) on the basis merchant needs to apply some action at their end.


RESPONSE CODE LIST USED BY THE SYSTEM:-

Below is the response code (Service Code) which will be send back to the
merchant in response of web-service request.

Error Code Error Desc ERR000 Records found ERR001 Merchant ID Cannot Be Blank
ERR002 Invalid Merchant ID ERR003 Invalid/Blank Merchant Encryption Key ERR004
Invalid/Blank Merchant Encryption IV ERR005 Invalid/Blank Bank Code ERR006 No
Records Found ERR007 Parameter Mismatch

Currency Code Currency Desc INR Indian Rupee SGD Singapore Dollar GBP Pound
Sterling USD American Dollar OMR Omani Riyal BHD BAHRAIN DINAR AED UAE DIRHAM
EUR EURO CAD Canadian Dollar  CHF Swiss Franc THB Baht LKR Sri Lanka Rupee  MYR
Malaysian Ringgit QAR QUTAR RIAL  HKD Hong Kong Dollar  KWD Kuwaiti Dinar  BDT
Bangladesh taka NZD New Zealand Dollar AUD Austrailian dollar NPR Nepalese
Rupee  CNY Chinese Yuan renminibi  KES Kenyan Shilling MUR Maritius Rupee PHP
Philippine Peso SAR Saudi Riyal JPY Japanese Yen ZAR South African Rand