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 name | description | example |
|---|---|---|
| merchant_order_id | unique identification number in merchant's system. allow characters : 0-9 a-z A-Z. maximum length = 40 | ORDER0123456789789445566 |
| amount | amount. 2 digit decimal points no thousand seperator. | 1000.00 |
| bank | bank code. | KBANK |
| account_no | account number | 1234567890 |
| account_name | account name | สมชาย นามสมมุติ |
| notify_url | notification 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.
| param | description |
|---|---|
| platform_order_id | A unique platform order id. You will use this id to identify the order. |
| merchant_order_id | Your merchant order id. |
| order_datetime | Order datetime |
| bank | bank code. see bank codes below |
| account_no | account number |
| account_name | account name |
| amount | amount |
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 code | bank |
|---|---|
| KBANK | Kasikorn Bank |
| BBL | Bangkok Bank |
| KTB | Krungthai Bank |
| TTB | TMBThanachart Bank |
| SCB | Siam Commercial Bank |
| UOB | UOB |
| BAY | Krungsri Ayudthaya |
| CIMB | CIMB |
| LH | Land and House |
| GSB | Government Saving Bank |
| KK | Kiatnakin Pattara |
| CITI | CITIBANK |
| GHB | Government Housing Bank |
| BAAC | Bank for Agriculture and Agricultural Cooperatives |
| TISCO | TISCO |
| CLICX | CLICX Bank |