Hiya 👋

If you want your customers to pay you with their credit cards via your Himalayan Bank Merchant account on your WooCommerce site, you’re on the right track. Please see the requirements below before going through the whole setup.

Requirements

WooCommerce is the world’s most popular open-source eCommerce solution.

We’ll now need the Himalayan Bank Payment For WooCommerce plugin which is basically an extension of the WooCommerce plugin.

This setup tutorial assumes that you’re already familiar with WooCommerce. if you’re not, start with WooCommerce with 5 steps:

Installation

If you’re new to WordPress, here’s a beginner’s guide on how to install a WordPress plugin.

  1. Log into your WordPress site: https://example.com/wp-admin
  2. Go to Plugins > Add New > Search > and enter “Himalayan Bank Payment For WooCommerce
Himalayan Bank WooCommerce Plugin Installation

3. Install and activate the plugin.

Note: There are alternative ways of installing the plugin.

Setup

Once you install and activate the Himalayan Bank Payment For WooCommerce plugin, you’ll see new payment settings in WooCommerce.So, Navigate to WooCommerce > Settings > Payments, there will be a new option, Himalayan Bank.

Himalayan Bank Payment Option

Click on the “Manage” button to set up the payments and settings.

As you can see in the screenshot, you’ll need Merchant ID and API key to accept the payment on your Merchant account. For the Himalayan Bank to set up your Merchant account, you’ll need to provide the Public Signing Key and Public Encryption Key to Himalayan Bank.

You should generate the keys by yourself. Use this tool to generate the keys.

Steps:

1) Select 4096 bit RSA key size from the drop-down.

2) Click on Generate RSA Key Pair, it will generate the Public Key and Private Key (call them the Signing Keys)

3) Go back to your site’s settings and paste the Public Key and Private Key in the fields: “Public Signing Key” and “Private Signing Key”.

4) Once again, click on Generate RSA Key Pair, it will generate a new Public Key and Private Key (call them the Encryption Keys)

5) Go back to your site’s settings and paste the Public Key and Private Key in the fields: “Public Encryption Key” and “Private Encryption Key”.

Once you fill the keys, the settings will look something like this:

Provide the Public Signing Key and Public Encryption key to Himalayan Bank, they’ll set up your live Merchant. You should not share the Private Keys with anyone.

We’re done with the setup. now the pay with Himalayan Bank option will appear in the checkout where customers can pay directly via their credit card. They will be redirected to the HBL payment to securely pay with Credit Cards.

Himalayan Bank Payment Redirection

FAQ

Got issues?

Please carefully follow the setup instructions above especially the generation and sharing of signing/encryption keys. Most issues are probably due to incorrect Merchant Setup or configuration. However, technical errors do occur sometimes. If you face any issues, please turn on debugging from WooCommerce > Settings > Payments > Himalayan Bank Payment.

Logging in Himalayan Bank Plugin

Then, check out again to log the error.

After that, you can get the log details in WooCommerce > Status > Logs.

Himalayan Bank Response logs

These details might tell you what went wrong or contact the bank support.

I hope you found the tutorial helpful! If you have any questions or issues, let me know in the comments.

If you want to track your visitor’s journey check out the Customer Journey For WooCommerce plugin.

Customer Journey For WooCommerce
Accept Himalayan Bank payment from your WordPress site!
Tagged on:     

Sanjeev Aryal

Don't bury your thoughts, put your vision into reality ~ Bob Marley.

16 thoughts on “Accept Himalayan Bank payment from your WordPress site!

  • July 17, 2023 at 10:44 am
    Permalink

    what would be the reason for the error, “Unable to load and decrypt the token.”

    Reply
    • July 18, 2023 at 5:52 am
      Permalink

      Incorrect key/configuration. The key you generated & added in the settings doesn’t match the key bank used to create your merchant.

      Reply
  • June 2, 2023 at 9:41 am
    Permalink

    Hello!
    After I receive the access token, what should I include in the Secret (API) key?
    Is it an access token or encryptionkeyid?

    Reply
    • June 2, 2023 at 10:06 am
      Permalink

      It’s the Merchant password/secret provided by the bank while setting up your merchant.

      Reply
      • June 9, 2023 at 4:16 am
        Permalink

        Hello!
        Error Message:
        ERROR: request.officeId : Value CLAY_CRAFTS_N_MORE_ENTERPRISES_ECOM__NPL is not valid for Code type.

        How do I fix the error?

        Reply
    • January 28, 2023 at 2:33 pm
      Permalink

      That error usually means the issue with signing/encryption keys. Note that you should provide keys to the bank and the bank should use those keys to generate your Merchant. Consult with bank for confirmation.

      Reply
  • December 17, 2022 at 12:59 pm
    Permalink

    Hi Sanjeev

    I am seeking HBL PGW version 2.0, now you’ve released the beta version. So How long do you take to finalize? If you need resources to check all these functions, such as credit card during the development period, I would like to help you.

    Thank you
    Kumar Lama

    Reply
    • December 17, 2022 at 1:30 pm
      Permalink

      It’s the new API – v2. I just tagged ‘beta’ because it still needs testing to fix edge case issues. I’ll gather the reports from the users and release a stable v2.1.

      Hope this clarifies!

      Reply
  • December 17, 2022 at 12:44 pm
    Permalink

    Hello,

    I just installed it on my site. But it does not complete the payment process. When clicking on the payment button, pop up a form to save card details, also shows the location of the USA only not other countries listed in the country form field. When trying to go new tab in the browser, the pop-up form disappears.

    Reply
    • December 17, 2022 at 12:50 pm
      Permalink

      Hi Chitra – thanks for reaching out and testing the plugin 🙏.

      The popup is the browser asking to save the CC details. I’m not sure what county field are you talking about. Is there any chance you could create a video screencast?

      Reply
        • December 17, 2022 at 2:33 pm
          Permalink

          I checked out and see the standard checkout error. Here’s debugging steps:

          Turn on Debug log from WooCommerce > Payments > Himalayan Bank. Check the log file in wp-content/uploads/wc-logs/Himalayan-bank–{date}-xxx.log. You can see full technical details on what went wrong.

          Reply
          • December 18, 2022 at 3:20 am
            Permalink

            Hi Chitra, I received the logs but I actually was looking for the response from the bank which was missing – see https://prnt.sc/a4McJGiLtUzb. You can get it from WooCommerce > Status > Logs. Check the log with hbl-payment-{date}-{time}.txt.

            P.S. Update the plugin to v2.0.2

            Reply
  • December 11, 2022 at 1:31 pm
    Permalink

    how long it will take to release v2

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest