MegaSpin
MegaSpin agent API: login, users, game list, enter game, recharge, redeem and records.
- Base URL
https://megaspinpay.com/ws/service.ashx- Authentication
- MD5 sign (agentName + time + agentKey)
- Sections
- 14
Introduction#
MegaSpin Game API
Ver=2025.12.05
API URL#
URL : https://megaspinpay.com/ws/service.ashx
API Notes#
- When calculating sign, all strings should convert to lowercase。
- The length of string should not exceed 63 bits
- About Signature
{
agentName:agent01
agentkey:cb71121e4569433986bf401a347a7649
time:1595756537
sign= md5((agentName+time+agentKey).toLowcase());
ex: sign=md5(agent011595756537cb71121e4569433986bf401a347a7649)=1097bf94d4fa4a70641fc396ea1868ab
reference: https://megaspinpay.com/ws/service.ashx?action=getgamelist&agentName=agent01&time=1595756537&sign=1097bf94d4fa4a70641fc396ea1868ab
note:Time will expire after being used successfully once and needs to be replaced.
}Agent Login#
URL: /ws/service.ashx?action=agentLogin
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| agentName | string | required | Agent name |
| agentPasswd | string | required | Agent password after being encrypted by MD5 |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201, this field will show message to tell the reason,Otherwise, there is no such field. |
| agentKey | string | Use this field to calculate signature in subsequent API(notice:This field will change every time after the API agentLogin is successfully called) |
| Balance | string | The balance of agent |
reference:
https://megaspinpay.com/ws/service.ashx?action=agentLogin&agentName=agent01&agentPasswd=e10adc3949ba59abbe56e057f20f883e&time=1598452539
call specifications: less than 30 times per minutes(< 30/M)
Register User Account#
URL: /ws/service.ashx?action=registerUser
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| passwd | string | required | Player password after being encrypted by MD5 |
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Notice:When calculating sign, all strings should convert to lowercase,for example:
Md5(agentName.toLower() + time.toString()+agentKey.toLower())
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=registerUser&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
call specifications: less than 30 times per minutes(< 30/M)
Query User Information#
URL: /ws/service.ashx?action=queryInfo
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| passwd | string | required | Player password after being encrypted by MD5 |
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
| agentBalance | string | The balance of agent. |
| gameId | int | The game id of user. |
| userbalance | string | The balance of user. |
reference:
https://megaspinpay.com/ws/service.ashx?action=queryInfo&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
call specifications: less than 30 times per minutes(< 30/M)
GetGameList#
URL: /ws/service.ashx?action=getgamelist
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| data | json | |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=getgamelist&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97b5
call specifications: less than 30 times per minutes(< 30/M)
EnterGame#
URL: /ws/service.ashx?action=entergame
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| passwd | string | required | Player password after being encrypted by MD5 |
| agentName | string | required | Agent name |
| kindId | string | required | The game player want to play, the same field ‘kindId ‘ return from API getgamelist. |
| redirectUrl | string | optional | Callback url when game exited. |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
| agentBalance | string | The balance of agent. |
| gameId | int | The game id of user. |
| userbalance | string | The balance of user. |
| webLoginUrl | string | The quick login url for web game. Referrence: http://play.fortunepanda.vip/?OdGUUuFv+P0tyZjRXVrsOBWOvHe66hjtOpLjR4YDeLnQvmCLSh7t53rIB6bm7Kw8 |
reference:
https://megaspinpay.com/ws/service.ashx?action=entergame&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&kindId=2039&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
call specifications: less than 30 times per minutes(< 30/M)
Change The Password Of User#
URL: /ws/service.ashx?action=changePasswd
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| passwd | string | required | Player password after being encrypted by MD5 |
| passwdNew | string | required | New player password after being encrypted by MD5 |
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=changePasswd&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&passwdnew=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
call specifications: less than 30 times per minutes(< 30/M)
Recharge#
URL: /ws/service.ashx?action=recharge
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| amount | int | required | Amount to be recharged in cents. |
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=recharge&account=test01&amount=1&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
Notice:After recharged or redeemed through the terminal API successfully, Remark field of Transaction Detail in web management system will be recorded as ‘terminal’+timestamp.
call specifications: less than 30 times per minutes(< 30/M)
Redeem#
URL: /ws/service.ashx?action=redeem
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| amount | int | required | Amount to be redeemed in cents. |
| agentName | string | required | Agent name |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=redeem&account=test01&amount=1&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
call specifications: less than 30 times per minutes(< 30/M)
Get trade record#
URL: /ws/service.ashx?action=getTradeRecord
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| agentName | string | required | Agent name |
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| fromDate | string | required | The start time of this query. |
| toDate | string | required | End time of this query |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Notice:The time span between “fromDate” and “toDate” should be less than 1 month. You can only query the transaction records within 1 month from the current time at most.
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| data | json | |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=getTradeRecord&account=test01&agentName=agent01&fromDate=2023-04-01 00:00:00&toDate=2023-05-01 00:00:00&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
Notice:
- the ”insertTime” in data field is Beijing time.
- If the “score” in data field is positive, it indicates recharge action, and if it is negative, it indicates redeem action.
call specifications: less than 10 times per minutes(< 10/M)
Get Jp record#
URL: /ws/service.ashx?action=getJpRecord
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| agentName | string | required | Agent name |
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| fromDate | string | required | The start time of this query. |
| toDate | string | required | The end time of this query. |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Notice:The time span between “fromDate” and “toDate” should be less than 1 month.
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| data | json | |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=getjprecord&account=test01&agentName=agent01&fromdate=2023-04-01 00:00:00&todate=2023-05-01 00:00:00&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
Notice:the ”insertTime” in data field is Beijing time.
call specifications: less than 10 times per minutes(< 10/M)
Get game record#
URL: /ws/service.ashx?action=getGameRecord
Request: (Method: POST)
| parameter | type | necessity | description |
|---|---|---|---|
| agentName | string | required | Agent name |
| account | string | required | Account of players,The length should be between 6 to 32 chars. |
| time | long | required | Time stamp(refer to C # api System.currentTimeMillis()) |
| sign | string | required | =md5(agentName+time+agentKey) |
Response
| parameter | type | description |
|---|---|---|
| code | int | Result code(200:success,201:failure) |
| data | json | |
| msg | string | If result code is 201 this field will show message to tell the reason,Otherwise, there is no such field. |
reference:
https://megaspinpay.com/ws/service.ashx?action=getGameRecord&account=test01&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5
Notice:Game records can be traced back to for the last 7 days from current time.
call specifications: less than 10 times per minutes(< 10/M)
