MG+ Agent Guide for Single Wallet Integrations
Breadcrumbs

Rollback Transaction

This API is called when there is a need to reverse a previous transaction.

The rollback amount will always match the original transaction amount as partial rollbacks are not supported. As this method is idempotent, it is important that any duplicate calls return exactly the same as the first successful response.


POST {base_url}/rollback


Request Data

Name

Required

Data Type

Description

playerId

Yes

String (50)

System ID of the player.

amount

Optional

Number

Amount to be adjusted from the player account.

Amount may be 0 in certain cases but will never be negative.

currency

Optional

String (3)

Use ISO 4217 currency codes when specifying currencies, excluding cryptocurrencies.

txnId

Yes

String (256)

Unique MG+ transaction ID of the transaction to be rolled back. Also used as the idempotency key.

betId

Optional

String (256)

Bet ID for the transaction to be rolled back. This ID is helpful to refer different transactions to a single bet.

extOperatorToken

Optional

String (150)

Optional tracking identifier for this player, if a value was provided during the last login call response and during gameplay.

If MG+ calls outside of gameplay, then this parameter may not be present.


Example Request

JSON
{
  "playerId": "test_player",
  "amount": 110.00,
  "currency": "CNY",
  "txnId": " AQEAAgA4AAAAAAAAAE0CAAAAAAAA",
  "betId": "AIBQABYAAIIS4TAAAAAABAHXTC23AC7QAA",
  "extOperatorToken": "tracertoken77"
}


Response Data

Name

Required

Data Type

Description

balance

Yes

Number

New player balance after the rollback has been performed.


currency

Yes

String (3)

Currency code assigned to the player.

extTxnId

Optional

String (512)

ID of this transaction as stored in the Agent system.

extCreationTimeMs

Optional

Number

The timestamp of this transaction as stored in the Agent system (in Epoch milliseconds).


Example Response

JSON
{
  "currency": "CNY",
  "balance": 2050.50,
  "extTxnId": "QEFR-SUWE-OALC-SPUF",
  "extCreationTimeMs": 1673436250458
}


HTTP Response Codes

Status Code

Description

Example

200

OK

 

500

Internal server error