Payout Integration Guide

Overview

This API allow merchant can Funds Transfer to 3rd party using

  • Thailand Bank Account

  • PromptPay ID

    • PromptPay Tex ID

    • PromptPay Citizen ID

    • PromptPay Mobile phone

  • No minimum transfer, maximum 2 million baht, all channels, whether promptpay / Bank Account

  • Closed between 2.30 - 3.00 (Thailand Time) of every day.

  • API is real time after sending the request will effective immediately.

  • There must be a balance in the system equal to or greater than the amount to be transferred.

  • can see transaction history at ksher system

Payment Flow Sequence Diagram

Quick pay payment flow
Figure 1. Quick pay payment flow
  1. merchant Query to check balance in system have enough before tranfer

  2. send payout request with information Recipient Account. System will response result payout

  3. merchant can Query to check result payout have been sent to the system.

Specifications of Payout APIs

PAYOUT get_payout_balance

API method

URL

https://api.mch.ksher.net/KsherPay/get_payout_balance

Method

GET, POST

Parameter organization format

application/x-www-form-urlencoded

PAYOUT get_payout_balance Request Parameters

Parameter Type Required Example Description

appid

String(32)

YES

mch12345

Your Merchant Number. Check on merchant ksher. The format is mch{Merchant No}.

fee_type

String(16)

YES

THB

Currency code in Balance account have. refer to with ISO 4217. Value range:

THB: Thailand

nonce_str

String(32)

YES

ae0e6jm55qlq1o7

Random string, must be unique for signature.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

version

String(32)

NO

3.0.0

version api

time_stamp

String(32)

YES

3569990010059557

the time stamp of request order

Example 1. PAYOUT get_payout_balance Request Example
{
    "appid": "mch29989",
    "fee_type": "THB",
    "nonce_str": "7499e4195c2d8b7621c44a655536e83a",
    "sign": "7f5c1819ac7d081dc70021dd1bb94c9eac6cb762c9217026517683e00abbe7562f1e443a41ca204e7612dcb440361813e560cbf172f1d4921a0f3d114c9185858bff3cd0b5a7103cbd6521760fa97796c8c7cbf03d8cf57e19000ac9454ab4b6d9eee5af0e8f5da3407ab5b4fd61a60de3b3821b461a9c2f5efef9bae71d5e94",
    "time_stamp": "2022011112380000S"
}

PAYOUT get_payout_balance Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

appid

String(32)

YES

mch35000

Your Merchant Number. Check on how to find your appid/Merchant No.. The format is mch{Merchant No}.

balance

int

YES

0

Balance in account Merchant can transfer

nonce_str

String(32)

YES

Random string.

result

String(16)

YES

Value Range:FAIL/SUCCESS

  • FAIL: operation failed for some reasons, such as: the order no. could not be found in the ksher database or some parameters are not correct, etc. , it does not means the order failed, merchant should decide the next step according to the error code.

  • SUCCESS: Request check balance succeeded

Example 2. PAYOUT get_payout_balance Response Example
{
"code": 0,
"data": {
"balance": 0,
"nonce_str": "iff53OhESPwFw0RfFuzMgEC8wLllusnM",
"result": "SUCCESS"
},
"msg": "ok",
"sign": "6548e56aea1d4d3e515e95ac4d379c7774bd4565bf5a053703f3881e05031981768c04d6ebb6093c0b75b220682069df71e427593eebd4e530a276203eeef329",
"status_code": "",
"status_msg": "",
"time_stamp": "2021-12-27T18:14:18.943000+08:00",
"version": "3.0.0"
}

PAYOUT get_payout_balance Fail Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

err_code

String(32)

YES

SYSTEMERROR

Refer to the error list for the details

err_msg

String(128)

YES

system error

the detailed description of the error

nonce_str

String(32)

YES

Random string

result

string(16)

YES

FAIL

FAIL

Example 3. Fail Response Example
{
    "code": 0,
    "data": {
        "err_code": "KSHER_INVALID_PARAM",
        "err_msg": "error param fee_type.",
        "nonce_str": "7499e4195c2d8b7621c44a655536e83a",
        "result": "FAIL"
    },
    "msg": "ok",
    "sign": "916dec7dfd1202917cb1222491de011678322bfbb5b1162fd2cc5527902d4975df2fa65cc2f25cf982866900eebc822053e15d740fa6c8685ff6185fe4da968e",
    "status_code": "",
    "status_msg": "",
    "time_stamp": "2022-01-11T13:41:05.895725+08:00",
    "version": "2.0.0"
}

PAYOUT transfer API

  • Recommended to setup request timeout 10 seconds.*

API method

URL

https://api.mch.ksher.net/KsherPay/payout

Method

GET, POST

Parameter organization format

application/x-www-form-urlencoded

PAYOUT transfer API Request Parameters

Parameter Type Required Example Description

appid

String(32)

YES

mch12345

Your Merchant Number. Check on merchant ksher. The format is mch{Merchant No}.

mch_order_no

String(256)

YES

123456acb

Merchant order number, generated by merchant self. It must be unique on the merchant side.

channel

String

YES

payout

Fixed value:payout

total_fee

Integer

YES

100

total amount of the order and it must be an integer, add 00 for decimal.Example 150.50 THB total_fee = 15050

fee_type

String(16)

YES

THB

Currency code for total_fee. refer to with ISO 4217. Value range:

THB: Thailand

receiver_no

String

YES

0543240915

Transfer account.

If receiver_type=BANK, this Parameters will be bank Account number.

If receiver_type=PROMPTPAY_NATID, this Parameters will be PromptPay ID.

If receiver_type=PROMPTPAY_MSISDN, this Parameters will be PromptPay mobile phone number.

receiver_type

String

YES

BANK

Transfer type, Value range:

BANK: BANK account number;

PROMPTPAY_NATID: Promptpay ID number.

PROMPTPAY_MSISDN: Promptpay mobile number.

receiver_bank_code

String

YES (only receiver_type=BANK)

004

bank code. This value is mandatory when receiver_type=BANK.

for Bank support please see BANK support

receiver_mobile

String

NO

0982568791

Mobile phone number for receiving SMS messages

lang

String

NO

en

Language for receiving SMS messages. Value range:

EN for English

TH for Thai.

default is EN

attach

String

NO

The Remark or description

operator_id

String(32)

NO

41234

operator_id number at cashier, using for merchant have muti level account or Cashier. For more information please check at Muti level account or Cashier

nonce_str

String(32)

YES

ae0e6jm55qlq1o7

Random string, must be unique for signature.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

version

String(32)

NO

3.0.0

version api

time_stamp

String(32)

YES

3569990010059557

the time stamp of request order

Example 4. Request Example payout to Promptpay ID:
{
"appid": "mch38725",
"channel": "payout",
"fee_type": "THB",
"mch_order_no": "1640251674",
"nonce_str": "FpDXGfrzuEcQ3ntbyQTctlHPCULld52J",
"receiver_mobile": "0912345678",
"receiver_no": "11033001609xx",
"receiver_type": "PROMPTPAY_NATID",
"sign": "7b1ed8a82dfe588ba0d43d05ad98e1ad77d5ed4d53c9f853c26f4c300cb1ebea5185586cd90e787aaa48d3685ed54274f231019f6e13ef26e23237b9c20e7c0678cd1d78a0543b7523826c03a2b5d38ac1f792ff7fc7434bafe8feb42fcd2357b46afd3a0a4359ef857446175529e51a7bc38bfa130a16e77a5d7d10f8527c8d",
"time_stamp": "20211223172754",
"total_fee": 110
}
Example 5. Request Example payout to Promptpay Mobile Number:
{
"appid": "mch38725",
"channel": "payout",
"fee_type": "THB",
"mch_order_no": "1640251772",
"nonce_str": "NMdmU89LJ2ZRhPOe3PSsKEmXcF109TQO",
"receiver_no": "09825687xx",
"receiver_mobile": "0912345678",
"receiver_type": "PROMPTPAY_MSISDN",
"sign": "7e332441516e8b1ddbbee683a6a5a97c7a1eaf28bf53f83d12cb0ce42b2093588745b7168b3e32e955c9c28747b8ab7f9febeec0ab43061555bed6c4c5dd66ee8fe4cf208d816c5f975db7fdb860cf0c8a92e94fa429af63c6cb93f6ab82fa101887175620a88eb93ce29c5337d613dbfe6d54b93a5b837610f1f72128293f28",
"time_stamp": "20211223172932",
"total_fee": 120
}
Example 6. Request Example payout to Bank Account:
 {
    "appid": "mch29989",
    "attach": "test BANK",
    "channel": "payout",
    "fee_type": "THB",
    "mch_order_no": "20210110121103",
    "nonce_str": "7cfd8667342f855a22ebdeafef394cb1",
    "operator_id": "",
    "receiver_bank_code": "002",
    "receiver_mobile": "0812345678",
    "receiver_no": "1900016666",
    "receiver_type": "BANK",
    "sign": "108f0cf133f8ec983e99d7a4aa58031085a6e0cf4da2405a7c31875ed471c8484b1f8230c1184221a43a7aea9b4049b9a71df8d2814ec8c3395d15c351d22cac4606a9802a18ccac64041507096635dd60bcc2041aaa5061ff7f9e4a88d5b30a9a44cfec5e3c0ea17180f056db78c85c2fd7c7ad4797c16eec7d1ba3da94c10c",
    "time_stamp": "2022011216174343S",
    "total_fee": 100
}

PAYOUT transfer API Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

appid

String(32)

YES

mch35000

Your Merchant Number. Check on how to find your appid/Merchant No.. The format is mch{Merchant No}.

channel_order_no

String(32)

YES

2021122316543124004466807

bank order number. Only response with result "SUCCESS"

ksher_order_no

String(32)

YES

90020211223175426906768

order number Ksher side

mch_order_no

String(256)

YES

123456acb

Merchant order number, generated by merchant self. It must be unique on the merchant side.

mdr

String(256)

YES

100

Commission fee + tax

nonce_str

String(32)

YES

YZDU8gNdiYI1e3kaXYcDnMjG2Em5GdP3

32-bit random characters

receiver_name

String

YES

MISS TEST_P0170109 P0170109

receiver account name

result

String(16)

YES

Value Range:FAIL/PENDING/PROCESSING/SUCCESS

  • FAIL: operation failed for some reasons, such as: the order no. could not be found in the ksher database or some parameters are not correct, etc. , it does not means the order failed, merchant should decide the next step according to the error code.

  • PENDING: transfer is in progress.

  • PROCESSING: transfer is in progress.

  • SUCCESS: transfer is succeeded

total_fee

Integer

YES

100

total amount of the order and it must be an integer, add 00 for decimal.Example 150.50 THB total_fee = 15050

trade_type

String

YES

PAYOUT

channel pay, Fixed value PAYOUT

Example 7. PAYOUT transfer Successful Response Example
{
    "code": 0,
    "data": {
        "appid": "mch29989",
        "channel_order_no": "2022011218395523002024807",
        "ksher_order_no": "80020220112193950272875",
        "mch_order_no": "20210110121105",
        "mdr": 260,
        "nonce_str": "7cfd8667342f855a22ebdeafef394cb1",
        "receiver_name": "MISS TEST_P0170109 P0170109",
        "result": "SUCCESS",
        "total_fee": 100,
        "trade_type": "PAYOUT"
    },
    "msg": "ok",
    "sign": "bd434c67336e539f3e7e35de52ecceaf75489bae04281f05bc163f042ec3cd129651d2eabcd6ccb1285ad041efde1076d5e47610460b18ddc57e4cbd2a27572a",
    "status_code": "",
    "status_msg": "",
    "time_stamp": "2022-01-12T19:39:56.512879+08:00",
    "version": "3.0.0"
}

PAYOUT PAYOUT transfer API Fail Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

err_code

String(32)

YES

SYSTEMERROR

Refer to the error list for the details

err_msg

String(128)

YES

system error

the detailed description of the error

nonce_str

String(32)

YES

Random string

result

string(16)

YES

FAIL

Value Range:FAIL/PENDING/PROCESSING/

  • FAIL: operation failed for some reasons, such as: the order no. could not be found in the ksher database or some parameters are not correct, etc. , it does not means the order failed, merchant should decide the next step according to the error code.

  • PENDING: transfer is in progress.

  • PROCESSING: transfer is in progress.

Example 8. PAYOUT transfer Fail Response Example
{
    "code": 0,
    "data": {
        "err_code": "KSHER_API_NO_RIGHTS",
        "err_msg": "KSHER_API_NO_RIGHTS",
        "nonce_str": "",
        "result": "FAIL"
    },
    "msg": "ok",
    "sign": "9e4d7b2dad573d13997087bc841cbe81a9f7dc1786c236b1dad65cffe16242063df3c88da8504ca6445e889df99f2e074a1e2f0fb3b4014ef3c07e31930722c7",
    "status_code": "",
    "status_msg": "",
    "time_stamp": "2021-12-27T16:34:30.418793+08:00",
    "version": "2.0.0"
}

PAYOUT transfer query API

API method

URL

https://api.mch.ksher.net/KsherPay/order_query_payout

Method

GET, POST

Parameter organization format

application/x-www-form-urlencoded

PAYOUT transfer query API Request Parameters

Parameter Type Required Example Description

appid

String(32)

YES

mch12345

Your Merchant Number. Check on merchant ksher. The format is mch{Merchant No}.

mch_order_no

String(256)

YES

123456acb

Merchant order number, generated by merchant self. It must be unique on the merchant side.

channel

String

YES

payout

Fixed value:payout

nonce_str

String(32)

YES

ae0e6jm55qlq1o7

Random string, must be unique for signature.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

version

String(32)

NO

3.0.0

version api

time_stamp

String(32)

YES

3569990010059557

the time stamp of request order

Example 9. Request Example payout
{
"appid": "mch29217",
"channel": "payout",
"mch_order_no": "20210110121104",
"nonce_str": "cZlBbtmOa1Sv0epbFOVwJqT24B7LQoyO",
"sign": "b2f43e80e32107a01582ef0ce2fbab3fc950f157aac281d440f9afd76f05856996f4363dff177ebc259015df78e4a1c9c54aab9e21e835eddc4acd87a695bce565dbfd466e6113a824e2a65661857d74a00891767386e270fac7ca2f93cfcd3d0eb182b874dda4caa250318bbf9d747c4a38f006b920005264d14086bcf8ab83",
"time_stamp": "20211227165234"
}

PAYOUT transfer API Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

appid

String(32)

YES

mch35000

Your Merchant Number. Check on how to find your appid/Merchant No.. The format is mch{Merchant No}.

attach

String

NO

The Remark or description

attach

String

NO

The Remark or description

cash_fee

int

YES

the amount buyer paid in the currency of cash_fee_type

cash_fee_type

String

YES

comply with ISO 4217, THB by default.

channel

String

YES

payout

Fixed value:payout

channel_order_no

String(32)

YES

2021122316543124004466807

bank order number. Only response with result "SUCCESS"

device_id

String(32)

NO

POS001

terminal id from which the request is sent, assigned by merchant.

fee_type

String(16)

YES

THB

Currency code for total_fee. refer to with ISO 4217. Value range:

THB: Thailand

ksher_order_no

String(32)

YES

90020211223175426906768

order number Ksher side

mch_order_no

String(256)

YES

123456acb

Merchant order number, generated by merchant self. It must be unique on the merchant side.

mdr

String(256)

YES

100

Commission fee + tax

nonce_str

String(32)

YES

Random string

openid

String(16)

YES

CNY

Each user has a unique id under E-Wallet.

operation

String

YES

ORDER-QUERY

this shows what operatation the request is.

operator_id

String(32)

NO

41234

operator_id number at cashier, using for merchant have muti level account or Cashier. For more information please check at Muti level account or Cashier

rate

String(16)

YES

Exchange rate of foreign currency to RMB.

raw_total_fee

Int

YES

total amount orginal send to payout.

receiver_name

String

YES

MISS TEST_P0170109 P0170109

receiver account name

result

String(16)

YES

Value Range:FAIL/PENDING/PROCESSING/SUCCESS

  • FAIL: operation failed for some reasons, such as: the order no. could not be found in the ksher database or some parameters are not correct, etc. , it does not means the order failed, merchant should decide the next step according to the error code.

  • PENDING: transfer is in progress.

  • PROCESSING: transfer is in progress.

  • SUCCESS: transfer is succeeded

trade_type

String

YES

PAYOUT

channel pay, Fixed value PAYOUT

Example 10. PAYOUT transfer query Successful Response Example
{
    "code": 0,
    "data": {
        "appid": "mch29989",
        "attach": "test BANK",
        "cash_fee": 100,
        "cash_fee_type": "THB",
        "channel": "payout",
        "channel_order_no": "2022011216521223001652907",
        "device_id": "",
        "fee_type": "THB",
        "ksher_order_no": "80020220112175206651966",
        "mch_order_no": "20210110121104",
        "mdr": 260,
        "nonce_str": "7cfd8667342f855a22ebdeafef394cb1",
        "openid": "",
        "operation": "ORDER-QUERY",
        "operator_id": 15030,
        "rate": "1.000000",
        "raw_total_fee": 100,
        "result": "SUCCESS",
        "time_end": "2022-01-12 16:52:06",
        "total_fee": 100
    },
    "msg": "ok",
    "sign": "6c9ce516a981275cb4f2934fafeeaf6e66ba678acc6df39328ee880035234cfa7b25a82c0c28e1b0ca016cbead243c1ca22d360d43687e3d0f5597b32f8a377f",
    "status_code": "",
    "status_msg": "",
    "time_stamp": "2022-01-12T19:34:50.350897+08:00",
    "version": "3.0.0"
}

PAYOUT transfer query API Fail Response Parameters

Parameter Type Required Example Description

code

int

YES

0

Value Range: * 0: it only shows the calling of the API is successful, not meaning the target business operation succeed. * Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

msg

String(32)

YES

the response message.

sign

String(256)

YES

b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4

Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page

status_code

String

YES

  • 0: it only shows the calling of the API is successful, not meaning the target business operation succeed.

  • Non 0: Calling of the API failed, merchant can use the same parameters to launch the request again.

status_msg

String(256)

NO

the status message

time_stamp

String(32)

YES

2020042015374848S

the time stamp of request order

version

String(32)

NO

3.0.0

version api

data Parameters (JSON )

err_code

String(32)

YES

SYSTEMERROR

Refer to the error list for the details

err_msg

String(128)

YES

system error

the detailed description of the error

nonce_str

String(32)

YES

Random string

result

string(16)

YES

FAIL

Value Range:FAIL/PENDING/PROCESSING/SUCCESS

  • FAIL: operation failed for some reasons, such as: the order no. could not be found in the ksher database or some parameters are not correct, etc. , it does not means the order failed, merchant should decide the next step according to the error code.

  • PENDING: transfer is in progress.

  • PROCESSING: transfer is in progress.

Example 11. PAYOUT transfer query Fail Response Example
{
"code": 0,
"data": {
"err_code": "KSHER_INVALID_ORDER_NO",
"err_msg": "failed to find this order no ('mch_order_no: ksher_order_no:8002021121622593274373344444 channel_order_no:' ).",
"nonce_str": "IPKJLyH5hj9sel7VCykhdlduO7qVO4tT",
"result": "FAIL"
},
"msg": "ok",
"sign": "3b059271013cbaecc29717452e300fe0cc6bae2b7585694b170a52b85ae03b6bb47218cfecd284ab9ef0fee7ea04ba2ae1b69859be262d129cc38483489786b9",
"status_code": "",
"status_msg": "",
"time_stamp": "2021-12-27T16:58:52.076126+08:00",
"version": "3.0.0"
}

BANK support

(Receiving Bank)

Bank Code Bank Short Name Bank Name PromptPay (CID/TaxID/Mobile No.) Account No.

002

BBL

BANGKOK BANK PUBLIC COMPANY LIMITED

YES

YES

004

KBANK

KASIKORNBANK PUBLIC COMPANY LIMITED

YES

YES

004

KBANK

KASIKORNBANK PUBLIC COMPANY LIMITED

YES

YES

006

KTB

KRUNG THAI BANK PUBLIC COMPANY LIMITED

YES

YES

011

ttb

TMBThanachart Bank Public Company Limited

YES

YES

014

SCB

SIAM COMMERCIAL BANK PUBLIC COMPANY LIMITED

YES

YES

017

CITI

CITIBANK, N.A. (CITI), BANGKOK BRANCH

YES

YES

018

SMBC

SUMITOMO MITSUI BANKING CORPORATION

YES

YES

020

SCBT

STANDARD CHARTERED BANK (THAI) PUBLIC COMPANY LIMITED

YES

YES

022

CIMBT

CIMB THAI BANK PUBLIC COMPANY LIMITED

YES

YES

024

UOBT

UNITED OVERSEAS BANK (THAI) PUBLIC COMPANY LIMITED

YES

YES

025

BAY

BANK OF AYUDHYA PUBLIC COMPANY LIMITED

YES

YES

029

IOB

Indian Oversea(Thai) Bank Public Company LTD

NO

YES

030

GSB

THE GOVERNMENT SAVINGS BANK

YES

YES

031

GHB

THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED

YES

YES

032

DB

DEUTSCHE BANK AKTIENGESELLSCHAFT

YES

YES

033

GHB

GOVERNMENT HOUSING BANK

YES

YES

034

BAAC

BANK FOR AGRICULTURE AND AGRICULTURAL COOPERATIVES

YES

YES

039

MHCB

MIZUHO CORPORATE BANK LIMITED

YES

YES

052

BOC

BANK OF CHINA

YES

YES

065

TBANK

THANACHART BANK PUBLIC COMPANY LIMITED

YES

YES

066

ISBT

ISLAMIC BANK OF THAILAND

YES

YES

067

TISCO

TISCO BANK PUBLIC COMPANY LIMITED

YES

YES

069

KKP

KIATNAKIN BANK PUBLIC COMPANY LIMITED

YES

YES

070

ICBC Thai

INDUSTRIAL AND COMMERCIAL BANK OF CHINA (THAI) PUBLIC COMPANY LIMITED

YES

YES

071

TCRB

THE THAI CREDIT RETAIL BANK PUBLIC COMPANY LIMITED

YES

YES

073

LH BANK

LAND AND HOUSES PUBLIC COMPANY LIMITED

YES

YES

079

ANZ

ANZ BANK (THAI) PUBLIC COMPANY LIMITED

No

YES

ERROR CODES

Only Payout ERROR CODES

Name Description Reason Solution

012

Account Problem

(only payout) Account Problem

Check your Recipient Account information is correct

052

Provider or Service Not Register

(only payout) Provider or Service Not Register

Check your Recipient Account information is correct

054

System Unavailable

(only payout) System Unavailable

Check your Recipient Account information is correct

058

Insufficient Funds

(only payout) Insufficient Funds

Please contract Ksher

209

Transaction Not Found

(only payout) Transaction Not Found

Transaction Not Found, Check your request information

210

Time Out

(only payout) Time Out

Check your Recipient Account information is correct

211

Invalid Data (specify field name)

(only payout) Invalid Data (specify field name)

Check your Recipient Account information is correct

212

Duplicated Transaction Reference

(only payout) Duplicated Transaction Reference

Duplicated Transaction, Check your request information

220

Transaction Expired, Cannot be processed

(only payout) Transaction Expired, Cannot be processed

Duplicated Transaction Reference, Check your request information

252

Promptpay Not Register

(only payout) Promptpay Not Register

Check your Recipient Account information is correct and register Promptpay

254

Out Of Service Hour

(only payout) Out Of Service Hour

Out Of Service Hour, Service Closed between 2.30 - 3.00 (Thailand Time) of every day.

261

Over Transaction Limit

(only payout) Promptpay Not Register

Check your Recipient Account information is correct and register Promptpay

261

Over Transaction Limit

(only payout) Over Transaction Limit

Over Transaction Limit maximum 2 million baht

341

Service Not Ready

(only payout) Service Not Ready

Please contract ksher

888

Other Errors

(only payout) Other Errors

Please contract ksher

Other Errors

KSHER_API_ERR_DEDUCT_PAYOUT_BALANCE

failed to deduct the merchant balance due to concurrent requests, etc. Both of the above can re-initiate the transfer.

Example {"code": 0, "status_code": "", "status_msg": "", "sign": "1b47579948958ddf86ee1918b4bd08b806233bba1a683e230109990f2e3883ec63ea25cd0cc2a72b69f4ddf4abbdec91d2f33fad7fb6a53ffa83f10ecb68dc7d", "version": "3.0.0", "msg": "ok", "time_stamp": "2023-08-30T11:21:58.438026+08:00", "data": {"nonce_str": "AFPr", "err_msg": "KSHER_API_ERR_DEDUCT_PAYOUT_BALANCE", "result": "FAIL", "err_code":

Standard ERROR CODES

Name Description Reason Solution

APPID_NOT_EXIST

APPID not exist

APPID was absent in parameters.

Please check if the APPID is correct.

APPID_MCHID_NOT_MATCH

APPID and MCHID not match

APPID and MCHID not match

please check if the APPID and mchid match.

INVALID_ORDER_NO

invalid order no.

order no. passed in is not correct.

parameter error, please check if the original order no. passed in exist or if the original order is failed.

KSHER_SIGN_ERROR

signature error

merchant signature is not correct

check the signature parameter

KSHER_SYSTEMERROR

Error occurred during handling the request.

Error occurred during handling the request.

Issue the refund request again.

KSHER_VERSION_ERROR

API version used by merchant is not compatible with the API of the vendor

API version used does not match

contact the vendor to confirm current API version

KSHER_ERROR_ORDER_NO

Missing order no parameter

Missing order no parameter

Check the order no.(mch_order_no, ksher_order_no, channel_order_no)

KSHER_REFUND_EXPIRE

Refund can not be made via API by merchant after the order already settled.

Refund can not be made via API by merchant after the order already settled.

Please submit refund request on the Ksher merchant platform.

KSHER_INVALID_MCHINFO

merchant information is not correct

the appid passed in does not exist in the vendor’s system

confirm if the appid passed in is correct, contact the vendor if needed.

KSHER_INVALID_ORDER_NO

order no. does not exist

the order no. passed in cannot be found in vendor’s system

check if the order no. passed in is correct

KSHER_INVALID_REFUND_FEE

invalid amount to refund

amount to refund is greater than the available amount

check if the amount to refund is correct

KSHER_INVALID_REFUND_AMOUNT

Partially refund is not allowed

Partially refund is not allowed

refund completely is allowed.

KSHER_INVALID_REFUND_BALANCE

The balance amount of this order(price fee minus amount already refunded.) is not enough for the amount to refund.

The balance amount of this order(price fee minus amount already refunded.) is not enough for the amount to refund.

Check the amount to refund.

KSHER_INVALID_REFUND_ORDER_NO

invalid refund order no.

the refund order no. passed already used.

check if the refund order no. passed in, use a new one.

KSHER_INVALID_REFUND_FEE_OR_TYPE

Refund currency or amount invalid

Refund currency or amount invalid

Check the currcency or amount to refund.

KSHER_PARAM_OVERLENGTH

Some parameters are too long.

Some paramters are too long

Check the parameters.

KSHER_INVALID_PARAM

Missing parameter(s)

Some parameter(s) invalid

Check parameter(s) is correct

KSHER_DUPLICATED_ORDERNO

The merchant order no already used.

The merchant order no already used.

Use a new order no to make the order again.

KSHER_EXCEED_AMOUNT_LIMIT

the amount to pay exceeds the amount limit configured

the amount to pay exceeds the amount limit configured

make sure if the amount to pay exceeds the limit.

KSHER_FEETYPE_NOT_MATCH

fee type does not match

pricing fee type does not match the registered fee type

merchant needs to modify the program, if merchant is sure that the fee type passed in is correct, contact the vendor.

KSHER_DUPLICATED_ORDERNO

The merchant order no already used.

The merchant order no already used.

Use a new order no to make the order again.

KSHER_DUPLICATED_REFUND_ORDERNO

invalid refund order no

the refund order no. passed already used.

check if the refund order no. passed in, use a new one.

KSHER_AMOUNT_IS_TOO_SMALL

The amount is too small.

The amount is too small

Pass in a larger amount

KSHER_CHANNEL_RESPONSE_ERROR

Error occurred during query operation

Error occurred during query operation

Make an order query again.

LACK_PARAMS

parameter absent

mandatory parameter(s) was absent

please check if the parameters were sufficient

MCHID_NOT_EXIST

MCHID not exist

MCHID was absent in parameters.

please check if the MCHID is correct.

NOAUTH

the merchant has no access to this interface.

the merchant has not yet got the access to this interface.

contact the vendor(Ksher)

NOT_UTF8

coding format error

required coding format was not used.

please use UTF-8 coding

NOTENOUGH

Not enough unsettled fund for refund

There is not enough unsettled fund for refund

This error code means refund request failed due to not enough unsettled fund for refund.Merchants need to contact Ksher to authorise credit for this kind of situation. If unsettled fund is enough ,please call the refund API once there is enough unsettled fund, or retry it continuously.

ORDERPAID

order closed already

the order closed already.

the order no. is already closed, please launch a new order.

ORDERNOTEXISTR

the order no. does not exist

the order does not exist in the system

merchant need to check if the order no. is correct.

OUT_TRADE_NO_USED

repetitive out_trade_no

the same order cannot be submitted for multi times.

please verify whether the out_trade_no. was submitted repetitively

PARAM_ERROR

parameters error

parameters requested are not correct

check the application according to the information returned, contact the vendor if needed.

POST_DATA_EMPTY

post parameters are empty

post parameters should not be empty

please check the paremeters posted in the http request.

REQUIRE_POST_METHOD

please use POST method

the method used to pass the parameters was not POST.

please check if the parameters was passed by POST method

SYSTEMERROR

system error

system timeout

call the order query API immediately to check order status, and decide next step according to the status of the order

SIGNERROR

signature error

the signature parameter is not correct

please check if the signature parameter and method meet the requirements of signature algorithm

TRADE_STATE_ERROR

order state error

there will be latency for the result for refund application, please query later(20 minutes for balance payment, 3 workdays for card payment)

USER_ACCOUNT_ABNORMALE

refund failed

user account is exceptional or unregistered.

this status stands for the failure of the refund operation, merchant can handle the refund by himself.

XML_FORMAT_ERROR

XML format error

XML format error

please check whether the format of XML parameters is correct.

SHOP_ID_ERROR

Invalid merchant information

Invalid merchant information

Please check if the APPID is correct.

CANCEL_ERROR

The cancellation failed

The cancellation failed

Order cannot cancel because of wallet not support or already paid

ORDER_NOT_EXIST

This order does not exist.

Not found this order

Check mch order no is correct or not

USER_NOT_EXIST

This user does not exist.

Not found this order

Check mch order no is correct or not

ORDER_NOT_PAY

This order has not been paid.

This order has not been paid.

Order still not paid

ORDER_ALREADY_REFUND

This order has been refunded.

This order has been refunded.

order has been refunded.

REFUND_FAILED

Refund failed.

Refund failed.

check value is correct

EXPIIRE_ORDER

The order has timed out

The order has timed out

expired time set in order is timeout

ORDER_ERROT

Order number must be unique

Order number must be unique

Check order should be not duplicate or create before

SHOP_NOT_EXIST

This shop does not exist

This shop does not exist

Please check if the APPID is correct.

PRICE_NOT_EXIST

Invalid price

Invalid price

Check amount should be not 0 or create this order before

MCH_ORDER_ERROR

Duplicate order number

Duplicate order number

Check order should be not duplicate or create before

RADIS_DOES_NOT_EXIST

Redis does not exist

Check url is correct

QUERY_ORDER_ERROR

Search for failed not completed transaction

Search for failed not completed transaction

check your value is correct

ORDER_PAYMENT_ERROR

Your payment failed

Your payment failed

Retry to paid again

SMS_CODE_ERROR

Failed to receive OTP code

Failed to receive OTP code

check you mobile phone is correct

CHANNEL_LIST_ERROR

You have not apply for any ewallets nor credit card payment services

You have not apply for any ewallets nor credit card payment services

check your channel value is correct or support

MEMBER_ID_ERROR

member_id cannot be number only

member_id cannot be number only

Please check your member_id not use Real number like 1,1200,00001, but can use string with number like ABC1234.

SAVE_CARD_ERROR

Failed to save card

Failed to save card

Check Bank card channel can support save card function

MEMBER_CARD_ERROR

This card cannot be used

This card cannot be used

This card is not available, please change card to paid

EMPTY_CARD_NO

Card information is incorrect

Card information is incorrect

Check your card input information

DELETE_MEMBER_CARD_ERROR

Failed to delete card

Failed to delete card

Refresh page and try to delete again

MEMBER_CARD_NOT_EXIST

This card does not exists

This card does not exists

check your member_id is correct

MEMBER_ID_LENGTH_OUT_OF_LIMIT

member_id cannot be more than 32 characters

member_id cannot be more than 32 characters

Please check your member_id not use Real number like 1,1200,00001, but can use string with number like ABC1234.

and member_id cannot be more than 32 characters

ORDER_ALREADY_CANCEL

The order has been canceled

The order has been canceled

This order already cancel, Please try to create the new order.

ORDER_ALREADY_CANCEL_OPERATION_CANNOT_BE_PERFORMED

The order has been canceled, this action cannot proceed

The order has been canceled, this action cannot proceed

This order already cancel, Please try to create the new order.

ORDER_ALREADY_PAY_OPERATION_CANNOT_BE_PERFORMED

This order has already been paid, this action cannot proceed

This order has already been paid, this action cannot proceed

This order already paid, Please try to create the new order.

ORDER_ALREADY_PAYMENT_SUCCESS

Order has been completed

Order has been completed

This order already paid, Please try to create the new order.

INSTAL_FEE_PAYER_ERROR

Failed to apply setting of interest-bearing

Failed to apply setting of interest-bearing

check at instal_fee_payer_merchant_channel_list or instal_fee_payer is correct

TRUEMONEY_OPT_CODE_ERROR

Wrong OTP code

Wrong OTP code

check OTP is correct

MANY_OPEN

Someone is paying this bill. DO NOT pay twice.

Someone is paying this bill. DO NOT pay twice.

check on exclusive is turn on or not. if have another person open payment page

LANG_REPEAT_SUBMIT

Repetitive submission

Repetitive submission

order already create before, create the new one.