Skip to main content

GAP Seamless Wallet — Wallet API

These APIs are called by GAP to the Operator's server. The Operator must implement these endpoints.

Error Codes

CaseError Codes
Successful"OP_SUCCESS"
GeneralError"OP_GENERAL_ERROR"
TokenNotFound"OP_TOKEN_NOT_FOUND"
UserBlocked"OP_USER_BLOCKED"
UserDisabled"OP_USER_DISABLED"
InsufficientFund"OP_INSUFFICIENT_FUNDS"
InvalidTransaction"OP_ERROR_INVALID_TRANSACTION"
NegativeDebitAmount"OP_ERROR_NEGATIVE_DEBIT_AMOUNT"
UserNotFound"OP_USER_NOT_FOUND"
TransactionNotFound"OP_TRANSACTION_NOT_FOUND"
TransactionTimedOut"OP_TRANSACTION_TIMEOUT"
InvalidSignature"OP_INVALID_SIGNATURE"
InvalidGame"OP_INVALID_GAME"
WrongCurrency"OP_WRONG_CURRENCY"
TokenExpired"OP_TOKEN_EXPIRED"
WrongSyntax"OP_WRONG_SYNTAX"
WrongType"OP_WRONG_TYPE"
DuplicateTransaction"OP_DUPLICATE_TRANSACTION"
TransactionDoesNotExist"OP_TRANSACTION_DOES_NOT_EXIST"
SystemBusy"OP_SYSTEM_BUSY"
InvalidToken"OP_INVALID_TOKEN"
InvalidAmount"OP_INVALID_AMOUNT"
AccountLocked"OP_ACCOUNT_LOCKED"
AccountSuspended"OP_ACCOUNT_SUSPENDED"
InvalidIP"OP_INVALID_IP"
SystemUnderMaintenance"OP_SYSTEM_UNDER_MAINTENANCE"
InvalidParams"OP_INVALID_PARAMS"
RequestTimeOut"OP_REQUEST_TIMEOUT"

POST /balance

Balance: POST /balance

To retrieve user current balance from the Operator's system. Parameter should be in JSON format.

Confirmed: Balance is fetched real-time on every relevant action during gameplay — it is NOT cached from the login call. The operator's /balance endpoint is the authoritative source of truth.

  • Request URL: https://<operator_baseurl>/balance [POST]
  • Content-Type: application/json

Request

ParameterTypeEnforceDescription
operatorIdStringYesoperatorId of the operator
tokenStringYesToken for a particular session
userIdStringYesUser unique ID in operator system

Example: Sample Object of the data

{
OperatorId string `json:"operatorId"`
Token string `json:"token"`
UserId string `json:"userId"`
}

Response

ParameterTypeEnforceDescription
balanceFloat64YesCurrent balance of the user
statusStringYesResponse Status

Example: Sample Object of the data

{
Balance float64 `json:"balance"`
Status string `json:"status"`
}

Example Request

curl --location 'https://<operator_baseurl>/balance' \
--header 'Content-Type: application/json' \
--header 'Signature: <GAP_SIGNATURE>' \
--data '{
"operatorId": "xyz",
"token": "f562a685-a160-4d17-876d-ab3363db331c",
"userId": "xyz_user_id"
}'

Example Response (200 OK)

{
"balance": 949.38,
"status": "OP_SUCCESS"
}

POST /betrequest

Bet Request: POST /betrequest

To perform debit from the Operator's system upon a user placing a bet. Parameter should be in JSON format.

  • Request URL: https://<operator_baseurl>/betrequest [POST]
  • Content-Type: application/json

Request

ParameterTypeEnforceDescription
operatorIdStringYesoperatorId of the operator
tokenStringYesToken for a particular session
userIdStringYesUser unique ID in operator system
reqIdStringYesUnique request Id
transactionIdStringYesUnique Transaction Id
gameIdStringYesGame Id
roundIdStringYesGame round Id
debitAmountFloat64YesAmount to be debited from user
betTypeStringYesCasino
round_closedBoolNoDenotes the end of a round
eventNameStringNoEvent name (for sports)
eventIdStringNoEvent ID
eventdateInt64NoEvent date (unix timestamp)
eventStatusStringNoEvent status
marketNameStringNoMarket name
runnerNameStringNoRunner/selection name
exposureFloat64NoExposure amount
marketIdStringNoMarket ID
exposureEnabledBoolNoWhether exposure is enabled
exposureTimeInt64NoExposure time
competitionIdStringNoCompetition ID
competitionNameStringNoCompetition name
oddsFloat64NoOdds value
runnerTypeStringNoRunner type
selectionTypeStringNoSelection type
betfairEventIdStringNoBetfair event ID

Example: Sample Object of the data

{
OperatorId string `json:"operatorId"`
Token string `json:"token"`
UserId string `json:"userId"`
ReqId string `json:"reqId"`
TransactionId string `json:"transactionId"`
GameId string `json:"gameId"`
RoundId string `json:"roundId"`
DebitAmount float64 `json:"debitAmount"`
BetType string `json:"betType"`
RoundClosed bool `json:"round_closed"`
EventName string `json:"eventName"`
EventId string `json:"eventId"`
EventDate int64 `json:"eventdate"`
EventStatus string `json:"eventStatus"`
MarketName string `json:"marketName"`
RunnerName string `json:"runnerName"`
Exposure float64 `json:"exposure"`
MarketId string `json:"marketId"`
ExposureEnabled bool `json:"exposureEnabled"`
ExposureTime int64 `json:"exposureTime"`
CompetitionId string `json:"competitionId"`
CompetitionName string `json:"competitionName"`
Odds float64 `json:"odds"`
RunnerType string `json:"runnerType"`
SelectionType string `json:"selectionType"`
BetfairEventId string `json:"betfairEventId"`
}

Response

ParameterTypeEnforceDescription
balanceFloat64YesCurrent balance after debit
statusStringYesResponse Status

Example: Sample Object of the data

{
Balance float64 `json:"balance"`
Status string `json:"status"`
}

Notes:

  • Zero bet is possible for bonuses/rewards/freebets.
  • Operator must check for duplicate processing using transactionId.

POST /resultrequest

Result Request: POST /resultrequest

To perform credit to the Operator's system when a game round result is declared. Parameter should be in JSON format.

  • Request URL: https://<operator_baseurl>/resultrequest [POST]
  • Content-Type: application/json

Request

ParameterTypeEnforceDescription
operatorIdStringYesoperatorId of the operator
tokenStringYesToken for a particular session
userIdStringYesUser unique ID in operator system
reqIdStringYesUnique request Id
transactionIdStringYesUnique Transaction Id
gameIdStringYesGame Id
roundIdStringYesGame round Id
creditAmountFloat64YesAmount to be credited to user
betTypeStringYesCasino
round_closedStringNoDenotes the end of a round
eventNameStringNoEvent name
marketNameStringNoMarket name
runnerNameStringNoRunner/selection name
exposureFloat64NoExposure amount
marketIdStringNoMarket ID
exposureEnabledBoolNoWhether exposure is enabled
exposureTimeInt64NoExposure time

Example: Sample Object of the data

{
OperatorId string `json:"operatorId"`
Token string `json:"token"`
UserId string `json:"userId"`
ReqId string `json:"reqId"`
TransactionId string `json:"transactionId"`
GameId string `json:"gameId"`
RoundId string `json:"roundId"`
CreditAmount float64 `json:"creditAmount"`
BetType string `json:"betType"`
RoundClosed string `json:"round_closed"`
EventName string `json:"eventName"`
MarketName string `json:"marketName"`
RunnerName string `json:"runnerName"`
Exposure float64 `json:"exposure"`
MarketId string `json:"marketId"`
ExposureEnabled bool `json:"exposureEnabled"`
ExposureTime int64 `json:"exposureTime"`
}

Response

ParameterTypeEnforceDescription
balanceFloat64YesCurrent balance after credit
statusStringYesResponse Status

Example: Sample Object of the data

{
Balance float64 `json:"balance"`
Status string `json:"status"`
}

Notes:

  • GAP will retry up to 10 times on network failure with exponential backoff.
  • Final failure counts as success from GAP's perspective.

POST /rollbackrequest

Rollback Request: POST /rollbackrequest

To rollback (reverse) a transaction's effects and return the player balance. Parameter should be in JSON format.

Confirmed: Rollback/refund requests originate only from the game provider, NOT from GAP. GAP forwards the provider's rollback to the operator.

  • Request URL: https://<operator_baseurl>/rollbackrequest [POST]
  • Content-Type: application/json

Request

ParameterTypeEnforceDescription
operatorIdStringYesoperatorId of the operator
tokenStringYesToken for a particular session
userIdStringYesUser unique ID in operator system
reqIdStringYesUnique request Id
transactionIdStringYesUnique Transaction Id
gameIdStringYesGame Id
roundIdStringYesGame round Id
rollbackAmountFloat64YesAmount to be rolled back
betTypeStringYesCasino
rollbackReasonStringNoReason for rollback
round_closedStringNoDenotes the end of a round
eventNameStringNoEvent name
marketNameStringNoMarket name
runnerNameStringNoRunner/selection name
exposureFloat64NoExposure amount
marketIdStringNoMarket ID
exposureEnabledBoolNoWhether exposure is enabled
exposureTimeInt64NoExposure time
requestTypeStringNoRequest type
rollbackMessageStringNoRollback message

Example: Sample Object of the data

{
OperatorId string `json:"operatorId"`
Token string `json:"token"`
UserId string `json:"userId"`
ReqId string `json:"reqId"`
TransactionId string `json:"transactionId"`
GameId string `json:"gameId"`
RoundId string `json:"roundId"`
RollbackAmount float64 `json:"rollbackAmount"`
BetType string `json:"betType"`
RollbackReason string `json:"rollbackReason"`
RoundClosed string `json:"round_closed"`
EventName string `json:"eventName"`
MarketName string `json:"marketName"`
RunnerName string `json:"runnerName"`
Exposure float64 `json:"exposure"`
MarketId string `json:"marketId"`
ExposureEnabled bool `json:"exposureEnabled"`
ExposureTime int64 `json:"exposureTime"`
RequestType string `json:"requestType"`
RollbackMessage string `json:"rollbackMessage"`
}

Response

ParameterTypeEnforceDescription
balanceFloat64YesCurrent balance after rollback
statusStringYesResponse Status

Example: Sample Object of the data

{
Balance float64 `json:"balance"`
Status string `json:"status"`
}