CmsWager Integration Document
  • Introduction
  • Before Start
  • Sportsbook UI
    • Integration
    • Window Message Events
  • CmsWager Api
    • Summary
    • Authentication
    • API Reference
      • Login/Register User
      • Freebet and Bonus assignment
    • Errors
  • Client API Reference
    • Summary
    • Api Reference
      • Bet placement
      • Cancelling bets
      • Concluding bets
      • Reopening concluded bets
      • Partial Cashout
      • Insurance
  • Frontend Api (optional)
    • Summary
    • Api Reference
      • Components
        • Top Leagues
        • Prematch Active Sports
        • Prematch Sport Menu
        • Last minute
        • Live now (reduced)
      • Matches
        • Tournament Odds
        • Match Odds
  • Appendix
    • Transaction types
    • Bet Status
    • Bet Type
    • Error Codes
Powered by GitBook
On this page
  1. Client API Reference
  2. Api Reference

Concluding bets

POST {clientApi}/ticket/result

When a bet is concluded, a request will be sent to the client system with the odds and ticket updated status (see appendix).

The received request may contain a deposit amount. In this case the amount should be added to user balance.

If this request encounters a server error, it will be retried for 24 hours until it gets a meaningful response

"Concluding bet" request will be sent only for tickets with status "0" (in running). If the ticket status on client side is different from "0" please response with failiure "406" code. This means that a previous "Reopening concluded bet" message was sent and has not been processed

Example request

{
  "clientId": "xyzk",
  "userId": 123456,
  "transactionType": 1,
  "amount": 10.56,
  "ticket": {
    "id": 123456,
    "code": "abcd1234",
    "amount": 10.56,
    "isBonus": false,
    "isFreebet": false,
    "freebetId": 0,
    "totalWin": 10.56,
    "resultDate": "2024-05-03T23:45:00Z",
    "status": 2,
    "odds": [
      {
        "odd": {
          "id": "12sd665",
          "name": "Home",
          "oddValue": 1.2
        },
        "status": 2
      },
      {
        "odd": {
          "id": "12sd665",
          "name": "Home",
          "oddValue": 1.2
        },
        "status": 2
      }
    ]
  }
}

Example Success Response

Response code 200

If the request is successfully pocessed in client system and the deposit amount (if present) was added to user balance, a 200 response should be returned

{    
    "status": "success",
    "balance": 140.85,
    "error_code": 0,
    "error_message": ""
}

Example Failure Response

Response code 406

If there is any error in client system, a 406 response cose should be returned

{
    "status": "error",
    "balance": 140.85,
    "error_code": 406,
    "error_message": "client error"
}
PreviousCancelling betsNextReopening concluded bets

Last updated 1 month ago