Klasha Inline

Embed Klasha into your website using our inline JavaScript integration.

Take the following steps to integrate the Klasha payment gateway into your website and begin accepting payments from anywhere in the world:

  • Embed Klasha JavaScript into the head tag of your HTML code.

  • Define a JavaScript function in your script file.

Embed Klasha JavaScript into the head tag of your HTML code

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script type="text/javascript" src="https://js.klasha.com/pay.js"></script>
    <title>Klasha Payment</title>
  </head>

  <body>
    
    <form>
      <input type="button" onclick="payWithKlasha()" value="Pay With Klasha" />
    </form>

    
  </body>
</html>

Define a JavaScript function in your script file

Pop-up Sample

Callback response

With this, other activities like confirming a Transaction Status can be done.

Webhook response

If you have Webhook notifications set up on the dashboard, we will send you a transaction response in the format below:

Last updated