Create Withdraw

Merchant may use this api endpoint to withdraw amount from merchant balance to player.

URL : /withdraw/create

Method : POST

Data constraints

{
   "merchant_id" : "[Merchant id]",
   "token" : "[Auth Token]",
   "time" : "[Time Stamp]",
   "merchant_order_id" : "[unique merchant order id]",
   "amount" : "[amount]",
   "bank" : "[bank code]",
   "account_no" : "[account number]",
   "account_name" : "[account name]" ,
   "notify_url" : "[notify url]"
}

Explainations

param namedescriptionexample
merchant_order_idunique identification number in merchant's system. allow characters : 0-9 a-z A-Z. maximum length = 40ORDER0123456789789445566
amountamount. 2 digit decimal points no thousand seperator.1000.00
bankbank code.KBANK
account_noaccount number1234567890
account_nameaccount nameสมชาย นามสมมุติ
notify_urlnotification url for webhook. this url will be called once the withdraw status is updated.https://merchant.com/callback/withdraw

Data example

{
   "merchant_id": "AA12345678",
   "token": "testtokentesttokentesttokentesttokentesttoken",
   "time": 1656272222,
   "merchant_order_id" : "ORDER112233445566",
   "amount" : "1000.00",
   "bank" : "KBANK",
   "account_no" : "1234567890",
   "account_name" : "สมชาย นามสมมุติ" ,
   "notify_url" : "https://merchant.com/callback/withdraw"
} 

Response

Here are response parameters.

paramdescription
platform_order_idA unique platform order id. You will use this id to identify the order.
merchant_order_idYour merchant order id.
order_datetimeOrder datetime
bankbank code. see bank codes below
account_noaccount number
account_nameaccount name
amountamount

Success Response

Code : 200 OK

Content example

{
    "success": 200,
    "data": {
        "platform_order_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "merchant_order_id": "ORDER112233445566",
        "order_datetime": "2024-04-28 21:49:39",
        "bank": "KBANK",
        "account_no": "1234567890",
        "account_name": "สมชาย นามสมมุติ",
        "amount": "1000.00"
    }
}

Error Response

Condition : If invalid merchant id, token, or singature

Code : 403 BAD REQUEST

Content :

{
    "error": {
        "code": 403,
        "message": "authentication failed"
    }
}

Condition : If something went wrong.

Code : 500 ERROR

Content :

{
    "error": {
        "code": 500,
        "message": "amount must be greater than 20"
    }
}

Bank Codes

bank codebank
KBANKKasikorn Bank
BBLBangkok Bank
KTBKrungthai Bank
TTBTMBThanachart Bank
SCBSiam Commercial Bank
UOBUOB
BAYKrungsri Ayudthaya
CIMBCIMB
LHLand and House
GSBGovernment Saving Bank
KKKiatnakin Pattara
CITICITIBANK
GHBGovernment Housing Bank
BAACBank for Agriculture and Agricultural Cooperatives
TISCOTISCO
CLICXCLICX Bank