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.
NameDescriptionData TypeStatus
betIdUnique ID of the betString (length: 36)Required
playerIdPlayer if of betString (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

NameDescriptionData Type
betIdUnique ID of the betstring (length: 36)
transactionPlaceBetIdUnique ID of the Placebet transactionString
transactionPayoutIdUnique ID of the payout transactionString
statusThe status of the betEnum ('RESOLVED', 'PENDING', 'FAILED', 'CANCELED')

Bet Status

StatusDescription
PENDINGThe bet is in progress on the operator's server
RESOLVEDThe bet has been completed on the operator's server
FAILEDThe bet has failed on the operator's server
CANCELEDThe 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!"
    }
}
Language
Click Try It! to start a request and see the response here!