Wallet API
Wallet API Reference - Operator API
Wallet API is an API to integrate Seamless wallet logic to Bingão. The API works in a manner where Bingão is the consumer and the Operator needs to provide corresponding endpoints based on the following API structures.
Returns real-time balance information by validating game access and retrieving data from the Inventory service.
Process Flow:
Validate player session and game code format
Extract room ID from game code (format: "BINGAO_{roomId}")
Verify game availability via Room Manager
Retrieve current balance from Inventory service
Requirements:
Valid X-Player-Token header
Game code in format "BINGAO_{roomId}"
Supported currency (ISO 4217)
Sample request:
{
"gameCode": "BINGAO_550e8400-e29b-41d4-a716-446655440000",
"currency": "BRL"
}Sample response:
{
"player": "550e8400-e29b-41d4-a716-446655440000",
"status": "RS_OK",
"currency": "BRL",
"balance": "1250.50"
}REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
Player access token for session validation
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Successfully retrieved player balance with current amount and currency information.
Invalid request data, malformed game code, unsupported currency, or player validation failure.
Invalid or missing X-Player-Token header authentication.
Debits the player's account with bet amount after validating game access and player session.
Process Flow:
Validate player session and authentication token
Extract and validate transaction ID from headers
Verify game code format (format: "BINGAO_{roomId}")
Check game availability via Room Manager
Process debit transaction via Inventory service
Apply idempotency checks to prevent duplicate debits
Requirements:
Valid X-Player-Token header for authentication
Valid X-Transaction-Id header (GUID format) for idempotency
Game code in format "BINGAO_{roomId}"
Supported currency (ISO 4217)
Positive amount value
Sufficient balance in player account
Idempotency:
Re-sending the same X-Transaction-Id with identical body returns the same result (200 OK)
Re-sending the same X-Transaction-Id with a different body returns 409 Conflict
Sample request:
Important:
This endpoint does not return the updated balance
Use
/wallet/player/balanceto retrieve the current balance after processingAmount is debited as provided (decimal precision maintained)
Transaction will fail if player has insufficient balance
REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
Unique transaction identifier for request tracking
fd694e40-753f-4cdf-9c46-32f80e1b1fb8Player access token for session validation
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Bet transaction successfully processed and debited from player account.
No content
Invalid request data, malformed game code, unsupported currency, invalid amount, insufficient balance, or player validation failure.
Invalid or missing X-Player-Token header authentication.
Idempotency conflict: same X-Transaction-Id used with different request body.
No content
Credits the player's account with winning amount after validating game access and player session.
Process Flow:
Validate player session and authentication token
Extract and validate transaction ID from headers
Verify game code format (format: "BINGAO_{roomId}")
Check game availability via Room Manager
Process credit transaction via Inventory service
Apply idempotency checks to prevent duplicate credits
Requirements:
Valid X-Player-Token header for authentication
Valid X-Transaction-Id header (GUID format) for idempotency
Game code in format "BINGAO_{roomId}"
Supported currency (ISO 4217)
Positive amount value
Idempotency:
Re-sending the same X-Transaction-Id with identical body returns the same result (200 OK)
Re-sending the same X-Transaction-Id with a different body returns 409 Conflict
Sample request:
Important:
This endpoint does not return the updated balance
Use
/wallet/player/balanceto retrieve the current balance after processingAmount is credited as provided (decimal precision maintained)
REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
Unique transaction identifier for request tracking
7881704e-f897-45f8-820b-9929e687a17fPlayer access token for session validation
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Win transaction successfully processed and credited to player account.
No content
Invalid request data, malformed game code, unsupported currency, invalid amount, or player validation failure.
Invalid or missing X-Player-Token header authentication.
Idempotency conflict: same X-Transaction-Id used with different request body.
No content
Returns betting transaction history with round-based grouping and optional filtering by session or round.
Features:
Transactions grouped by round ID for better organization
Optional filters: sessionId and roundId
Pagination support (default: page 1, size 10)
Only returns BET type transactions
Player-scoped results (authenticated player only)
Response Format:
JSON with camelCase naming
Indented formatting for readability
Null values excluded
Sample request:
GET /api/v1/wallet/transaction/bet?pageNumber=1&pageSize=20&sessionId=550e8400-e29b-41d4-a716-446655440000Sample response:
{
"roundId": "round_550e8400-e29b-41d4-a716-446655440000",
"transactions": [
{
"transactionId": "txn_123456789",
"amount": "25.50",
"currency": "BRL",
"timestamp": "2024-01-15T14:30:00Z",
"type": "bet"
}
]
}REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
The page number for pagination (1-based indexing). Controls which page of results to return. Default value is 1.
1The number of transaction groups per page. Controls response size and performance. Default value is 10, recommended range 1-100.
10Optional game session identifier (GUID format) to filter transactions by specific gaming session. When provided, only transactions from the specified session are returned.
Optional round identifier (GUID format) to filter transactions by specific game round. When provided, only transactions from the specified round are returned.
Player access token for session validation
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Successfully retrieved paginated betting transactions with round-based grouping and applied filters.
Invalid request parameters, malformed GUIDs, invalid pagination values, or missing player authentication.
Invalid or missing X-Player-Token header authentication.
No betting transactions found for the specified filtering criteria.
Returns winning transaction history with round-based grouping and optional filtering by session or round.
Features:
Win transactions grouped by round ID
Optional filters: sessionId and roundId
Pagination support (default: page 1, size 10)
Only returns WIN type transactions
Player-scoped results (authenticated player only)
Includes regular wins, bonuses, and jackpots
Response Format:
JSON with camelCase naming
Indented formatting for readability
Null values excluded
Sample request:
GET /api/v1/wallet/transaction/win?pageNumber=1&pageSize=25&sessionId=550e8400-e29b-41d4-a716-446655440000Sample response:
{
"roundId": "round_550e8400-e29b-41d4-a716-446655440000",
"winTransactions": [
{
"transactionId": "win_txn_987654321",
"amount": "125.75",
"currency": "BRL",
"timestamp": "2024-01-15T14:32:15Z",
"type": "win"
}
]
}REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
The page number for pagination (1-based indexing). Controls which page of win results to return. Default value is 1.
1The number of win transaction groups per page. Controls response size and performance. Default value is 10, recommended range 1-100.
10Optional game session identifier (GUID format) to filter win transactions by specific gaming session. When provided, only win transactions from the specified session are returned.
Optional round identifier (GUID format) to filter win transactions by specific game round. When provided, only win transactions from the specified round are returned.
Player access token for session validation
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Successfully retrieved paginated winning transactions with round-based grouping and applied filters.
Invalid request parameters, malformed GUIDs, invalid pagination values, or missing player authentication.
Invalid or missing X-Player-Token header authentication.
No winning transactions found for the specified filtering criteria.
Reverts a BET transaction by crediting back the original bet amount to the player's account after validating transaction integrity.
Process Flow:
Extract and validate rollback transaction ID from headers
Retrieve original BET transaction by transaction ID from request body
Verify transaction exists and is of type BET
Verify rollback amount matches original BET amount
Check if transaction was already rolled back
Process rollback credit via Inventory service
Apply idempotency checks to prevent duplicate rollbacks
Requirements:
Valid X-Transaction-Id header (GUID format) for idempotency
Request body must contain the original BET transaction ID to be rolled back
Referenced transaction must exist and be of type BET
Rollback amount must exactly match original BET amount
Transaction cannot have been previously rolled back
Supported currency (ISO 4217)
Idempotency:
Re-sending the same X-Transaction-Id with identical body returns the same result (200 OK)
Re-sending the same X-Transaction-Id with a different body returns 409 Conflict
Sample request:
Important:
This endpoint does not return the updated balance
Use
/wallet/player/balanceto retrieve the current balance after processingAmount must exactly match the original BET amount
Once rolled back, the same transaction cannot be rolled back again
REQUIRED - JWT Authorization header using the Bearer scheme. All API endpoints require authentication, except for authentication endpoints (Connect/authentication). Example: "Authorization: Bearer {token}"
Unique transaction identifier for request tracking
1417156b-f533-4ac1-bb37-99d5d9a35197Rollback transaction successfully processed and amount credited back to player account.
No content
Invalid request data, transaction not found, transaction is not a BET type, amount mismatch, or transaction already rolled back.
Referenced transaction ID not found in the system.
Idempotency conflict: same X-Transaction-Id used with different request body.
No content
Last updated