Cancel Bet

The Cancel Bet API is called when the Place Bet API is timed out or the Operator returns a response in the wrong format against Naga Games.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request

API URL : {OperatorAPIDomain}/{OperatorEndpoint}
HTTP Method : POST

Body Parameters

  • data (JSON)
    must contain all fields below.
NameDescriptionData TypeStatus
betIdUnique ID of the betString (length: 36)Required
playerToken

Unique token of the player

Note:
When the player token is enabled in the cancel bet configuration, the player token will be included in the payload for every request

String (length: 255)Optional
  • dataHash (String)
    All request data received from Naga Games is hashed with SHA-256 as a data checksum, signed with the private key, and generated for each operator using the RSA signing algorithm.

Header Parameters

  • X-Signature (String)
    Must be generated from signing process with correct order of data fields & privateKey.
🚧

About Signing & Verifying dataHash & Signature

Refer ➡️ How to signing & verify dataHash and signature for Seamless mode?

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)
statusThe status of the betMust be "CANCELED"
curl --location --request POST 'https://api-demo-operator.stg.game.topplatform.asia/vendor/cancel-bet' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data" : {
        "betId" : "41984486-2234-4aa8-be82-df58eab8b121"
    },
    "dataHash" : "7884a27f65954d52346fd51e43fbba9cdfeca81f08d67782e2addb99069434e9"
}'

Example of Response

Success Response Example (HTTP status code 200)

{
    data: {
      "betId": "41984486-2234-4aa8-be82-df58eab8b121",
      "status": "CANCELED"
    },
    error: null,
}
{
    "betId": "",
    "status": "CANCLED"
}

Success Response Example (HTTP Status code 201)

{
        data: {
          betId: '',
          status: "CANCELED",
        },
        error: null,
};

Fail Response Example (HTTP status code 400)

{
        data: null,
        error: {
          statusCode: 400,
          message: 'Transaction Seamless Already Resolved',
        },
}

Fail Response Example (HTTP status code 400)

{
        data: null,
        error: {
          statusCode: 404,
          message: "Transaction Not Found"
         },
}
Body Params
json
required
Defaults to { "betId": "9ffc5019-a536-412e-0549-241fc644dd35" }
string
required
Defaults to 7f360b4656e7be21b67b00c8085f2df060e9ad3ee681ee066d3695ef33db84a0
Headers
string
required
Defaults to hqCPFD+rxbyN2uwcKoV1o9M4xJEy+Q3wP6WAA+Vjbg4rotKyLoNikUsAd1am5nB6sTCkVKplAb4ZavmRVqXiH9HlEeezkRXl01j22bjpvFQelzp6vYjQ1q46z4WUH/V5Ut2xagZLUsCaXqBTd3if+yolMfZUxsl6WuTSIVqgZJU=
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json