To make the integration easier, there are several SDK packages can be used by developer.

SDK Support

You can find all the SDK packages here following:



  1. The SDK package takes care of the signature calculation and all the details of RESTFUL API communication.

  2. You still need to get merchant private KEY to use the SDK package for each programming language.

How to use

  • include SDK to your code

  • setting your private key and your parameters

Example request to create payment on website with Python SDK

from ksher.ksher_pay_sdk import KsherPay

appid = "mch35000"
privatekey = "/Users/yourpath/repo/ksher_sdk_python/mch_privkey.pem"
pubkey = "/Users/yourpath/repo/ksher_sdk_python/ksher_pubkey.pem"

payment_handle = KsherPay(appid, privatekey, pubkey)
data = {
    "total_fee": "100",
    "fee_type": "THB",
    "mch_code": "",
    "refer_url": "",
data['mch_order_no'] = "HelloWebsite"
resp = payment_handle.gateway_pay(data)

Example request to create payment on website with NodeJs SDK

const appid = "mch35000";  // setup your appid at here
const path = "/Users/example/ksher_sdk_nodejs/Mch35000_PrivateKey.pem"; // setup your private key path at here

const KsherPay = require('@kshersolution/ksher');
const sdk = new KsherPay(appid, path)

const mch_order_no =;
const gateway_payRequestData = {
  "mch_order_no": mch_order_no,
  "total_fee": "100",
  "fee_type": "THB",
  "mch_code": mch_order_no,
  "refer_url": "",
  "product_name": mch_order_no,
await sdk.gateway_pay(gateway_payRequestData)
  .then(response => {
    console.log("body: ",response);
.catch(error => {