Rollback
Rollback
Operation executed by GPAS when an error occurs while processing the game’s result, in order to restore the balance to an initial, correct state (such as one prior to a “bet” operation).
Endpoint Details
- Method: PATCH
- URL:
/movements/rollback
Request Parameters
| Name | Type | Request | Description |
|---|---|---|---|
| walletSessionId | String | QueryString | Wallet Session |
| externalMovementId | String | QueryString | Identifies the vendor’s unique transaction that you want to perform the rollback |
| x-parent-system-id | String | Header | Unique GPAS identifier in the operator system |
| x-signature | String | Header | Signature of the message for communication security, it must be in capital letters |
| externalReference | String | Body | Identifies the vendor’s unique transaction |
| description | String | Body | Description corresponding to the rollback operation |
| tags | Dictionary | Body | This parameter is used to group transactions, a dictionary with key value is sent, keep in mind that it is dynamic |
Response Parameters
| Name | Type | Request | Description |
|---|---|---|---|
| status | String | Body | Identifies the status of the transaction |
| movementId | String | Body | A unique identifier for the current accounting transaction in Operator Account System |
| leftBalance | Decimal | Body | Total user balance |
| amountBonus | Decimal | Body | Amount of bonus balance that was credited or debited depending on the rollback |
| subWalletsSummary | List | Body | Identify how the user’s balance is made up |
Request Example
PATCH /movements/rollback?walletSessionId=3fa85f64-5717-4562-b3fc-2c963f66afa6&externalMovementId=agt-b7219c1d2d5e1bd40a508ef19a672d06HEADERx-parent-system-id: BL13GTx-signature: SHA1(body + secret key)Example Signature
- Body: It is reported below
- SecretKey:
Ax34deSfgdB - SHA1: Encryption Function
- SHA1(
{"externalReference":"agt-u1385e2f3q8x9cv274618ybd7h612p26","description":"Rollback game move for customer id 6df5sd made by gpas","tags":{"gpasSessionId":"gpas-bfd9516b-c51f-4bd5-ab83-8899100dc636","gameid":"agt-13"}}Ax34deSfgdB) - Signature:
8A25D73497BA197F5E67C49E149814DFDFB2FB56
Request Body
{ "externalReference": "agt-u1385e2f3q8x9cv274618ybd7h612p26", "description": "Rollback game move for customer id 6df5sd made by gpas", "tags": { "gpasSessionId": "gpas-bfd9516b-c51f-4bd5-ab83-8899100dc636", "gameid": "agt-13", "roundid": "agt-311502" }}Response Example
{ "status": "CONFIRMED", "movementId": "se35cs15-w687-1eeb-xsw8-g58b3w5843a2", "leftBalance": 9150, "amountBonus": 20, "subWalletsSummary": [ { "code": "REAL", "leftBalance": 9100, "subWalletsSummary": null }, { "code": "BONUS", "leftBalance": 50, "subWalletsSummary": null } ]}Implementation Notes
- This method should reverse the effects of a previous transaction identified by
externalMovementId - If the transaction to be rolled back is a debit, the player’s balance should be incremented
- If the transaction to be rolled back is a credit, the player’s balance should be decremented
- If the transaction ID is not found, an appropriate error response should be returned
- The response should include the updated balance after the rollback operation
- All rollback operations must be idempotent (see Idempotence)