post https://api-demo-operator.stg.game.topplatform.asia/vendor/bet-status
With this API, Naga Games will call the Operator to get a bet status by betId.
Request
API URL : {OperatorAPIDomain}/{OperatorEndpoint}
HTTP Method : POST
Body Parameters
- data (JSON)
must contain all the fields below.
Name | Description | Data Type | Status |
---|---|---|---|
betId | Unique ID of the bet | String (length: 36) | Required |
playerId | Player if of bet | String (length: 36) | Optional |
- dataHash (String)
All request data coming from Naga Games would be hashed using SHA-256 as a data checksum and signed with the private key, which was generated for each operator using the RSA signing algorithm._ - x-signature (String)
_Must be generated from the signing process with the correct order of data fields and private key.
About Signing & Verifying dataHash & Signature
Please check at How to signing & verify dataHash and signature for Seamless mode?
Example
curl --location 'https://api-demo-operator.stg.game.topplatform.asia/vendor/bet-status' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-signature: fO/V9m01FBXZJp6QjKlrxaXDCJlo5I6din7w1fXULRD7q/GUwA0DD8PCgGUV8RhPHIQi4oopX8DgtXc36cHqR2CeardPpifAqNklbS6pNWGPHb6HwtfKduYvKFqYQYETJDl7jzCMEQDLc7iX9zC+uRMHKC4miULCSNHPzMr6Rb8=' \
--data '
{
"data": {
"betId": "82a8f9f5-adcf-710f-4a24-5f41d9d59d70"
},
"dataHash": "682b774b410ddbc460a0c3595500bb810b93266ed5304d8f1e235046fea52d3f"
}
Response
Response Structure
Refer ➡️ Success Response Structure and Failure Response Structure for HTTP Response structure and codes.
Data Response
Name | Description | Data Type |
---|---|---|
betId | Unique ID of the bet | string (length: 36) |
transactionPlaceBetId | Unique ID of the Placebet transaction | String |
transactionPayoutId | Unique ID of the payout transaction | String |
status | The status of the bet | Enum ('RESOLVED', 'PENDING', 'FAILED', 'CANCELED') |
Bet Status
Status | Description |
---|---|
PENDING | The bet is in progress on the operator's server |
RESOLVED | The bet has been completed on the operator's server |
FAILED | The bet has failed on the operator's server |
CANCELED | The bet has been cancelled on the operator's server |
Example of Response
Success Response Example (HTTP status code 200)
{
"data": {
"betId": "82a8f9f5-adcf-710f-4a24-5f41d9d59d70",
"transactionPlaceBetId": "82a8f9f5-adcf-710f-4a24-5f41d9d59d70-101-1683189712697",
"transactionPayoutId": "82a8f9f5-adcf-710f-4a24-5f41d9d59d70-201-1683189712873",
"status": "RESOLVED"
}
}
Fail Response Example (HTTP status code 400)
{
"data": null,
"error": {
"statusCode": 400,
"message": "Cannot verify data!"
}
}