Definitions
|
Term |
Definition |
|---|---|
|
Currency |
Use ISO 4217 currency codes when specifying currency (i.e. JPY), excluding cryptocurrencies. |
|
Deprecated |
Anything marked for deprecation will be removed in a future version of the Agent API, and replacements (if available) will be referenced. New integrations should not use anything marked for deprecation. |
|
Balance |
Decimal representation of the player’s balance with a maximum value of 922,337,203,685,477 units (9,223,372,036,854.77 with decimals) and cannot be negative. Please note that some game providers only support a max balance of 2,147,483,647 units (21,474,836.47 with decimals). |
|
Timestamp |
Timestamps (in UTC time zone) which is specified as the number of milliseconds since the Unix Epoch time or as Ticks. The specific type is indicated in every field. |
|
Idempotency |
Idempotent methods can be called repeatedly in a 24-hour period while producing the same result as if as was done once. |
Security
Server to Server
MG+ recommends Agents implement HTTPS for transport security. MG+ will support HTTP in cases where transport level security with the Agent is guaranteed by other means. Agents are also strongly encouraged to use IP whitelisting to ensure that only MG+ systems are making the calls (IPs will be provided to Agents by their Account Managers).
Shared API Token
All communications from MG+ to the Single Wallet Agent API can optionally include a shared token in the form of a request header (X-MGP-TOKEN). If provided, the Agent should always check this token to ensure the request comes from MG+ and is the expected value.
Custom API Security
Under special circumstances, integration can be done with an existing bearer (JWT token) based system that the agent might be using to secure API access.
Agents are expected to work with Account Managers to determine the right token(s) to use for each integration.
Headers
Every API call includes the headers as defined in the tables below:
Request Headers
|
Request Header Name |
Definition |
Data Type |
Example |
|---|---|---|---|
|
X-MGP-REQ-ID |
Unique ID used for this request. |
String (GUID format) |
ff5e4d89-13b4-44da-b8d8-b34bc4c8be81 |
|
X-MGP-TOKEN |
API Token to be verified to allow access to the API. |
String (see Shared API Token above) |
secretToken |
|
X-MGP-REQUEST-TIME |
Timestamp of the request. |
Number (current UTC time in Ticks) |
Marked for deprecation.
|
|
X-MGP-REQUEST-TIMEMS |
Timestamp of the request. |
Number (current UTC time in Epoch milliseconds) |
1673436250428 |
Response Headers
|
Response Header Name |
Definition |
Data Type |
Example |
|---|---|---|---|
|
X-MGP-REQ-ID |
Unique ID for the request that was received. |
String (GUID format) |
ff5e4d89-13b4-44da-b8d8-b34bc4c8be81 |
|
X-MGP-RESPONSE-TIME |
Time to process this request |
Integer (in milliseconds) |
10 |
JSON
Camel case naming convention with ignored null values.
All enum values (such as txnType, txnEventType, etc) must be matched case insensitive.