Skip to content

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

NameTypeRequestDescription
walletSessionIdStringQueryStringWallet Session
externalMovementIdStringQueryStringIdentifies the vendor’s unique transaction that you want to perform the rollback
x-parent-system-idStringHeaderUnique GPAS identifier in the operator system
x-signatureStringHeaderSignature of the message for communication security, it must be in capital letters
externalReferenceStringBodyIdentifies the vendor’s unique transaction
descriptionStringBodyDescription corresponding to the rollback operation
tagsDictionaryBodyThis parameter is used to group transactions, a dictionary with key value is sent, keep in mind that it is dynamic

Response Parameters

NameTypeRequestDescription
statusStringBodyIdentifies the status of the transaction
movementIdStringBodyA unique identifier for the current accounting transaction in Operator Account System
leftBalanceDecimalBodyTotal user balance
amountBonusDecimalBodyAmount of bonus balance that was credited or debited depending on the rollback
subWalletsSummaryListBodyIdentify how the user’s balance is made up

Request Example

PATCH /movements/rollback?walletSessionId=3fa85f64-5717-4562-b3fc-2c963f66afa6&externalMovementId=agt-b7219c1d2d5e1bd40a508ef19a672d06
HEADER
x-parent-system-id: BL13GT
x-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)