{
"username": "test0898765432",
"password": "aA444444",
"firstname": "test01",
"lastname": "test02",
"bank": "KBANK",
"acc_no": "0261294974",
"phone": "0812345678",
"agent": "agenttest",
"master_member": "member1"
}
3. API Transferwallet
| Parameter | Type | Description |
|---|---|---|
| username | String | Username should be prefix followed by phone number. |
| password | String | Password for login. |
| firstname | Number | Name must be matct with bank account. |
| lastname | String | Lastname must be matct with bank account. |
| bank | String | Bank name. |
| acc_no | Number | Account number. |
| phone | Number | Phone number. |
| agent | String | This member register under by this agent. |
| master_member | String | Copy payout and discount from this user. |
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| message | String | Information message. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2000 | user already exixt |
| 2041 | agent not found |
| 2043 | กรุณาส่ง Prefix |
| 2043 | กรุณาส่ง First Name |
| 2043 | กรุณาส่ง Last Name |
| 2043 | ไม่มี Prefix นี้ในระบบ |
| 2044 | invalid bank name or bankstatus |
| 2051 | invalid username |
| 2052 | password len is < 8 |
| 2053 | invalid phone |
| 2054 | invalid acc_no |
*code 2043 มาจากระบบฝาก/ถอนอัตโนมัติ
{
"code": 0,
"message": "success"
}
| Bank list | Description |
|---|---|
| SCB | ธนาคารไทยพาณิชย์ |
| KBANK | ธนาคารกสิกรไทย |
| BBL | ธนาคารกรุงเทพ |
| BAY | ธนาคารกรุงศรีอยุธยา |
| KTB | ธนาคารกรุงไทย |
| BAAC | ธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร |
| TMB | ธนาคารทหารไทย |
| ICBC | ธนาคารไอซีบีซี |
| TCD | ธนาคารไทยเครดิตเพื่อรายย่อย |
| CITI | ธนาคารซิตี้แบงก์ |
| SCBT | ธนาคารสแตนดาร์ดชาร์เตอร์ด |
| CIMB | ธนาคารซีไอเอ็มบีไทย |
| UOB | ธนาคารยูโอบี |
| GSB | ธนาคารออมสิน |
| HSBC | ธนาคารเอชเอสบีซี |
| MIZUHO | ธนาคารมิซูโฮ |
| GHB | ธนาคารอาคารสงเคราะห์ |
| LHBANK | ธนาคารแลนด์ |
| TBANK | ธนาคารธนชาต |
| TISCO | ธนาคารทิสโก้ |
| KKP | ธนาคารเกียรตินาคิน |
| IBANK | ธนาคารอิสลามแห่งประเทศไทย |
| TMB | ธนาคารทีเอ็มบีธนชาต |
| Parameter | Type | Description |
|---|---|---|
| agentUsername | String | Agent account , Account length is restricted to 36 chars at most. |
| playerUsername | String | Player username from partner system. |
| playerPassword | String | Player password from partner system. |
{
"agentUsername": "agenttest",
"playerUsername": "member2",
"playerPassword": "aA444444"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| data | Object | Object response. |
| playerApiId | String | Player Id from partner system. |
| playerApiUsername | String | Player username from AMBLotto system. |
| playerUsername | String | Player username from partner system. |
| tkUuid | String | Can use only 1 time. limit to 24 hours from generate time. |
| url | String | AMB Lotto link but don't show web header |
| urlFullPage | String | AMB Lotto link fullpage |
| message | String | Information message. |
| Parameter | Description |
|---|---|
| 0 | success |
| 1006 | Invalid UserAgent or ApiKey |
| 41001 | Error Request body is not an object. |
| 71001 | missing filed 'agentUsername'. |
| 71002 | missing filed 'playerUsername'. |
| 71031 | invalid username or password |
| 71005 | playerUsername must be between 4 and 36 characters long. |
{
"code": 0,
"data": {
"playerApiId": "066e56786c3458f6e7bb2e70c8de248d5d77184bee6db80b744fd68284b2",
"playerApiUsername": "member2@agenttest",
"playerUsername": "member2@agenttest",
"tkUuid": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJhZ2VudGlkIjoyMiwiZXhwIjoxNjMyNTY3ODMxLCJpYXQiOjE2MzE3MDM4MzEsInJvbGUiOiJtZW1iZXIyQGFnZW50dGVzdCIsInN1YiI6ZmFsc2V9.rVIC-1-5FXPcwd5OtyGD0Ds51NwmjshY87hYHbGkdt8",
"url": "https://test.pirate168.com/token?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJhZ2VudGlkIjoyMiwiZXhwIjoxNjMyNTY3ODMxLCJpYXQiOjE2MzE3MDM4MzEsInJvbGUiOiJtZW1iZXIyQGFnZW50dGVzdCIsInN1YiI6ZmFsc2V9.rVIC-1-5FXPcwd5OtyGD0Ds51NwmjshY87hYHbGkdt8&header=off",
"urlFullPage": "https://test.pirate168.com/token?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJhZ2VudGlkIjoyMiwiZXhwIjoxNjMyNTY3ODMxLCJpYXQiOjE2MzE3MDM4MzEsInJvbGUiOiJtZW1iZXIyQGFnZW50dGVzdCIsInN1YiI6ZmFsc2V9.rVIC-1-5FXPcwd5OtyGD0Ds51NwmjshY87hYHbGkdt8&header=on"
},
"message": "success"
}
| Parameter | Type | Description |
|---|---|---|
| agentId | String | Agent Id from partner system. |
| username | String | Username member. |
| amount | Number | Amount of deposit. |
| transaction_ref | String | Transaction reference Unique from your system type deposit. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agentId=AGENT_USERNAME&key=KEY_OF_AGENT&username=MEMBER_USER_NAME&amount=100.00 จำเป็นต้องมีทศนิยม 2 ตำแหน่งเสมอและ username กับ agentId เป็น lowercase และใช้ key เป็น key ในการเข้ารหัส กรุณาใช้ lowercase ในขณะที่เข้ารหัสและ body ที่ส่งมา |
{
"agentId": "ntc123",
"username": "member2",
"amount": 10.00,
"transaction_ref": "xxxy",
"signature": "7a0b7f992f7e7b053c0fc223f9503ee54df362e8906d05754505fb80ad94de77"
}
| Parameter | Type | Description |
|---|---|---|
| after_balance | Number | Balance after Deposit of member. |
| before_balance | Number | Balance before Deposit of member. |
| code | Number | Result Code Reference. |
| message | String | Information message. |
| ref | String | Reference id Unique from AMB Lotto system. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2031 | member not found |
| 2033 | invalid data value |
| 2037 | duplicate transaction ref |
| 2041 | agent not found |
| 2045 | invalid siganture |
{
"after_balance": 14010,
"before_balance": 14000,
"code": 0,
"message": "success",
"ref": "5f1cd7c3fb68ae7c679f8c33966610670d32ff1e",
}
| Parameter | Type | Description |
|---|---|---|
| agentId | String | Agent Id from partner system. |
| username | String | Username member. |
| amount | Number | Amount of withdraw. |
| transaction_ref | String | Transaction reference Unique from your system type withdraw. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agentId=AGENT_USERNAME&key=KEY_OF_AGENT&username=MEMBER_USER_NAME&amount=100.00 จำเป็นต้องมีทศนิยม 2 ตำแหน่งเสมอและ username กับ agentId เป็น lowercase และใช้ key เป็น key ในการเข้ารหัส กรุณาใช้ lowercase ในขณะที่เข้ารหัสและ body ที่ส่งมา |
{
"agentId": "ntc123",
"username": "member2",
"amount": 10.00,
"transaction_ref": "axcvb",
"signature": "7a0b7f992f7e7b053c0fc223f9503ee54df362e8906d05754505fb80ad94de77"
}
| Parameter | Type | Description |
|---|---|---|
| after_balance | Number | Balance after withdraw of member. |
| before_balance | Number | Balance before withdraw of member. |
| code | Number | Result Code Reference. |
| message | String | Information message. |
| ref | String | Reference id Unique from AMB Lotto system. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2031 | member not found |
| 2033 | invalid data value |
| 2037 | duplicate transaction ref |
| 2041 | agent not found |
| 2045 | invalid siganture |
{
"after_balance": 14000,
"before_balance": 14010,
"code": 0,
"message": "success",
"ref": "5f1cd7c3fb68ae7c679f8c33966610670d32ff1e",
}
| Parameter | Type | Description |
|---|---|---|
| agentId | String | Agent Id from partner system. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agentId=AGENT_USERNAME&key=KEY_OF_AGENT และใช้ key เป็น key ในการเข้ารหัส กรุณาใช้ lowercase ในขณะที่เข้ารหัสและ body ที่ส่งมา |
{
"agentId": "ntc123",
"signature": "52c4ef2da95b8071c425ecd0ef6ee970dbc04721ec5c5fb121e8aa42d29bcdd3"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| message | String | Information message. |
| credit | Number | Total credit agent. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2033 | invalid data value |
| 2041 | agent not found |
| 2045 | invalid siganture |
{
"code": 0,
"credit": 80922.99,
"message": "success",
}
| Parameter | Type | Description |
|---|---|---|
| agentId | String | Agent Id from partner system. |
| username | String | Username member. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agentId=AGENT_USERNAME&key=KEY_OF_AGENT&username=MEMBER_USER_NAME และใช้ key เป็น key ในการเข้ารหัส กรุณาใช้ lowercase ในขณะที่เข้ารหัสและ body ที่ส่งมา |
{
"agentId": "ntc123",
"username": "member2",
"signature": "1592e9c442942b7eb858a97c4e420ab2b7b8795d8a0cccf380f67ec9c86f716c"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| message | String | Information message. |
| credit | Number | Total credit member. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2031 | member not found |
| 2033 | invalid data value |
| 2041 | agent not found |
| 2045 | invalid siganture |
{
"code": 0,
"credit": 1020,
"message": "success",
}
| Parameter | Type | Description |
|---|---|---|
| agentId | String | Agent Id from partner system. |
| username | String | Username member. |
| transaction_ref | String | Transaction reference Unique from your system type deposit/withdraw. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agentId=AGENT_USERNAME&key=KEY_OF_AGENT&username=MEMBER_USER_NAME&transaction_ref=xxxxx1 username กับ agentId เป็น lowercase และใช้ key เป็น key ในการเข้ารหัส กรุณาใช้ lowercase ในขณะที่เข้ารหัสและ body ที่ส่งมา |
{
"agentId": "ntc123",
"username": "member2",
"transaction_ref": "e2154fea5da2dd0d1732ff30931723c2973003a0",
"signature": "a65718a555624256f4d613c3ccd587762da51472b38bf328a7bc02dfb02caf51"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| data | Object | Object response. |
| amount | Number | Amount of bet. |
| game | String | Product type. |
| outstanding | Number | The outstanding has not been calculated. |
| validAmount | Number | Validturn amount with out door. |
| wlTurnAmount | Number | Total Win/Loss . |
| message | String | Information message. |
| ref | String | Reference id Unique from AMB Lotto system. |
| username | String | Username member. |
| Parameter | Description |
|---|---|
| 0 | success |
| 2031 | member not found |
| 2033 | invalid data value |
| 2041 | agent not found |
| 2045 | invalid siganture |
| 2048 | log data not found |
{
"code": 0,
"data": {
"LOTTO": {
"amount": 0,
"game": "LOTTO",
"outstanding": 0,
"validAmount":0,
"wlTurnAmount":0,
},
"SLOT": {
"amount": 0,
"game": "SLOT",
"outstanding": 0,
"validAmount":0,
"wlTurnAmount":0,
}
},
"message": "success",
"ref": "9a15f42d1c524c306eb91c3df1216db248a8f224",
"username": "member2"
}
| Parameter | Type | Description |
|---|---|---|
| agentUsername | String | Agent account , Account length is restricted to 36 chars at most. |
| lottotype | String | Key of lotto type. |
| startDate | Date | Date type “yyyy-MM-dd HH:mm:ss” (GMT+7) |
| endDate | Date | Date type “yyyy-MM-dd HH:mm:ss” (GMT+7) |
{
"agentUsername": "ntc123",
"lottotype": "thailotto",
"startDate": "2021-09-02 15:04:05",
"endDate": "2021-09-16 15:04:05"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| data | Object | Object response. |
| date | String | The date the bet was placed. format(YYYY-MM-DD HH:mm:ss) |
| msg | String | Information message. |
| result | arrayobject | |
| name_th | String | |
| name_en | String |
| Parameter | Description |
|---|---|
| 0 | success |
| 41001 | Error Request body is not an object. |
| 71001 | missing filed 'agentUsername'. |
| 71011 | invalid lottotype |
| 71021 | please input startDate and endDate |
| 71022 | invalid input format 'startDate' field. |
| 71023 | invalid input format 'endDate' field. |
| 71034 | invalid format Date |
{
"code": 0,
"data": [
{
"name_th": "หวยไทย",
"name_en": "Thai Lotto",
"date": "2021-09-16 00:00:00",
"result": {
"top6": [
"070935"
],
"top3": [
"935"
],
"bottom3": [
"609",
"817",
"379",
"007"
],
"bottom2": [
"90"
]
}
}
],
"msg": "success"
}
| Parameter | Type | Description |
|---|---|---|
| username | String | Username member login. |
| old_password | String | Password for login. |
| new_password | String | New password for login. |
| confirm_password | String | Confirm password match new password |
| agent | String | This member register under by this agent. |
{
"username": "ntest10@ntc123",
"old_password": "aA123456",
"new_password": "aA444444",
"confirm_password": "aA444444",
"agent": "ntc123"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| message | String | Information message. |
| Parameter | Description |
|---|---|
| 0 | update password success |
| 2031 | user dose not exit |
| 2031 | new_password_equal_old_password |
| 2031 | invalid_old_password |
| 2031 | password len is < 8 |
| 2031 | password need a_z |
| 2031 | password need num |
| 2033 | invalid character '\"' after object key:value pair |
| 2058 | invalid confirm password |
{
"code": 0,
"message": "update password success"
}
| Parameter | Type | Description |
|---|---|---|
| agent | String | This member register under by this agent. |
| key | String | |
| username | String | Username member login. |
| new_password | String | New password for login. |
| signature | String | signature เข้ารหัสโดยใช้วิธีเข้ารหัสแบบ SHA256 โดย plaintext แบบ agent=AGENT_USERNAME&key=KEY_OF_AGENT&username=MEMBER_USER_NAME&new_password=aA123456 username กับ agentId เป็น lowercase และใช้ key เป็น key ในการเข้ารหัส |
{
"agent": "ntc123",
"key": "d79bd07b119f83c7cde0e3471b4bef99731f550d26c394ba0c8f55cd4f89581595fa",
"username": "member4",
"new_password": "aA1234567",
"signature": "d89586ab6e049aeca372930442fad711090e0dfa9b7b8f986b4ef235cee6cc80"
}
| Parameter | Type | Description |
|---|---|---|
| code | Number | Result Code Reference. |
| message | String | Information message. |
| Parameter | Description |
|---|---|
| 0 | update password success |
| 2031 | user dose not exit |
| 2033 | invalid character '\"' after object key:value pair |
| 2045 | invalid siganture |
| 2052 | password len is < 8 |
| 2052 | password need a_z |
| 2052 | password need A_Z |
| 2052 | password not contain spacebar |
| 2059 | invalid key |
{
"code": 0,
"message": "update password success"
}