Skip to Content

Place Bet

A bet placement debits the player with a withdrawal transaction. If the debit cannot be confirmed because of a technical failure, GR8 Tech reverses it with a rollback transaction and the bet is not accepted.

Flow

Withdrawal transaction

Withdrawal request

Place bet - withdrawal request transaction
{ "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "10" } }

Withdrawal success response

The bet is accepted as long as the response is successful and there are no technical issues. In case of a technical issue, a rollback request may follow and the bet placement will be canceled.

Withdrawal success response transaction
{ "balances": { "sport": { "main": { "USD": { "cash": "100", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "100", "bonus": "0", "locked": "0" } } } }, "alreadyProcessed": false, "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "10" } }

Withdrawal error response

In case of an unsuccessful response, the bet is not accepted. This envelope is the same for every transaction type on the following pages.

Withdrawal fail response transaction
{ "error": { "code": "error.user.not-found", "message": "User with specified Id was not found", "origin": "{clientName}" }, "alreadyProcessed": false }

Rollback transaction

A rollback reverses a bet placement that could not be confirmed. It always carries context.parentId pointing at the original withdrawal.

Warning

3rd party wallet must guarantee processing of rollback requests. We will retry each rollback every 5 minutes until the success or the retry count is exhausted — see Rollback and Retry Logic for the current budget. In the case when a rollback request can’t be applied, there could be a resynchronization between the client’s wallet and bet state. The bet will be marked as broken on the GR8 Tech side and the operation can be retried manually by request to our team.

Note

Remote wallet is responsible for verifying if parent transaction (passed via context.parentId) exists. Expected remote wallet to return 400 status code with decline.parent.notfound error code in case no parent transaction found.

Caution

A rollback reverses a bet placement only. A settlement is never rolled back — it is corrected with cancelsettle or resettle, see Settlement Corrections.

Rollback request

Rollback transaction request
{ "currency": "USD", "platform": "sport", "id": "id", "type": "rollback", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "sport rollback", "betId": "4494226fa9c24b978b975823e353616b", "parentId": "parentTransactionId" }, "amountBreakdown": { "cash": "10" } }

Rollback success response

Same envelope as the withdrawal success response above: echo the request fields — including context.parentId — and add balances and alreadyProcessed.

Rollback error response

Rollback error response
{ "error": { "code": "decline.parent.notfound", "message": "ROLLBACK_NO_BET_FOUND - Transaction not found", "origin": "{clientName}" }, "alreadyProcessed": false }
Error codeWhen to return it
decline.parent.notfoundParent transaction was not found
decline.parent.failedParent transaction was found but it had failed