Seamless player rollback callback
Rollbacks a given transaction. We will always use the amount from the transaction_id that is being rollbacked ignoring actual amount in this request.
Query string name | type (max) | description | mandatory |
---|---|---|---|
callerId | String | Caller authentication username | Y |
callerPassword | String | Caller authentication password | Y |
action | string | External service action [balance, debit, credit, rollback] | Y |
username | String | Unique player id, user_username from getGame call | Y |
session_id | string (32 - 40) | Unique game session id generated by provider | Y |
amount | double(10,2) | We will use amount from original transaction to rollback | N |
game_id_hash | string | Game id, same as id used for game launch in getGame | N |
transaction_id | string(32-70) | Id of transaction that is going to be rollbacked | Y |
round_id | string(32-70) | Game round id for current running game round | N |
gameplay_final | integer(1) | It tells you if the round is finished(1..finished, 0..unfinished) | N |
gamesession_id | string (255) | Enable tracking the player game sessions | Y |
key | string (40) | Request validation cache key | Y |
Request
GET
<REMOTE URL>/api/seamless/s2s/gh?callerId=danitestdev_s&callerPassword=7c222fb2927d828af22f592134e8932480637c0d&action=rollback&username=946062&session_id=5abe10f0c71ae&amount=0.36&game_id_hash=ep_ep-emperors-tomb-mobile&transaction_id=ep-6ed9bb0895c1e&round_id=90731502789&gameplay_final=1&gamesession_id=ep_10066325-a82e6bb3bf387557f24e-13849&key=7d9e8b8d824bc46dcfc5a92fbb253da542472ab4
Response
{
"status"
:
"200"
,
"balance"
:
"300.00"
}
External service can respond with 3 type of status codes. 200 for success, 500 service error and 404 for missing transaction.
- status 500 will make the rollback to be retried
Example:
{
"status"
:
"404"
,
"msg"
:
"transaction missing"}
{
"status"
:
"500"
,
"msg"
:
"internal error"
}