GAP Seamless Wallet — Wallet API
These APIs are called by GAP to the Operator's server. The Operator must implement these endpoints.
Error Codes
| Case | Error 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
/balanceendpoint is the authoritative source of truth.
- Request URL:
https://<operator_baseurl>/balance[POST] - Content-Type:
application/json
Request
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| operatorId | String | Yes | operatorId of the operator |
| token | String | Yes | Token for a particular session |
| userId | String | Yes | User unique ID in operator system |
Example: Sample Object of the data
{
OperatorId string `json:"operatorId"`
Token string `json:"token"`
UserId string `json:"userId"`
}
Response
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| balance | Float64 | Yes | Current balance of the user |
| status | String | Yes | Response 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| operatorId | String | Yes | operatorId of the operator |
| token | String | Yes | Token for a particular session |
| userId | String | Yes | User unique ID in operator system |
| reqId | String | Yes | Unique request Id |
| transactionId | String | Yes | Unique Transaction Id |
| gameId | String | Yes | Game Id |
| roundId | String | Yes | Game round Id |
| debitAmount | Float64 | Yes | Amount to be debited from user |
| betType | String | Yes | Casino |
| round_closed | Bool | No | Denotes the end of a round |
| eventName | String | No | Event name (for sports) |
| eventId | String | No | Event ID |
| eventdate | Int64 | No | Event date (unix timestamp) |
| eventStatus | String | No | Event status |
| marketName | String | No | Market name |
| runnerName | String | No | Runner/selection name |
| exposure | Float64 | No | Exposure amount |
| marketId | String | No | Market ID |
| exposureEnabled | Bool | No | Whether exposure is enabled |
| exposureTime | Int64 | No | Exposure time |
| competitionId | String | No | Competition ID |
| competitionName | String | No | Competition name |
| odds | Float64 | No | Odds value |
| runnerType | String | No | Runner type |
| selectionType | String | No | Selection type |
| betfairEventId | String | No | Betfair 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| balance | Float64 | Yes | Current balance after debit |
| status | String | Yes | Response 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| operatorId | String | Yes | operatorId of the operator |
| token | String | Yes | Token for a particular session |
| userId | String | Yes | User unique ID in operator system |
| reqId | String | Yes | Unique request Id |
| transactionId | String | Yes | Unique Transaction Id |
| gameId | String | Yes | Game Id |
| roundId | String | Yes | Game round Id |
| creditAmount | Float64 | Yes | Amount to be credited to user |
| betType | String | Yes | Casino |
| round_closed | String | No | Denotes the end of a round |
| eventName | String | No | Event name |
| marketName | String | No | Market name |
| runnerName | String | No | Runner/selection name |
| exposure | Float64 | No | Exposure amount |
| marketId | String | No | Market ID |
| exposureEnabled | Bool | No | Whether exposure is enabled |
| exposureTime | Int64 | No | Exposure 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| balance | Float64 | Yes | Current balance after credit |
| status | String | Yes | Response 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| operatorId | String | Yes | operatorId of the operator |
| token | String | Yes | Token for a particular session |
| userId | String | Yes | User unique ID in operator system |
| reqId | String | Yes | Unique request Id |
| transactionId | String | Yes | Unique Transaction Id |
| gameId | String | Yes | Game Id |
| roundId | String | Yes | Game round Id |
| rollbackAmount | Float64 | Yes | Amount to be rolled back |
| betType | String | Yes | Casino |
| rollbackReason | String | No | Reason for rollback |
| round_closed | String | No | Denotes the end of a round |
| eventName | String | No | Event name |
| marketName | String | No | Market name |
| runnerName | String | No | Runner/selection name |
| exposure | Float64 | No | Exposure amount |
| marketId | String | No | Market ID |
| exposureEnabled | Bool | No | Whether exposure is enabled |
| exposureTime | Int64 | No | Exposure time |
| requestType | String | No | Request type |
| rollbackMessage | String | No | Rollback 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
| Parameter | Type | Enforce | Description |
|---|---|---|---|
| balance | Float64 | Yes | Current balance after rollback |
| status | String | Yes | Response Status |
Example: Sample Object of the data
{
Balance float64 `json:"balance"`
Status string `json:"status"`
}