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

Summary

The customer's API must contain the endpoints useful for ticket management. To validate CmsWager requests, the Header will contain 2 values useful for authentication and security.

  • "Public-Key"

  • "Hash"

The public Key is provided by CmsWager

Hash Calculation

In each request from Cmswager system to client Api, we calculate a SHA256 Hmac (keyed-hash message authentication code). So:

  • Algoithm is SHA256

  • Key is the private key provided by CmsWager

  • String used for calculatio is the Json request body

Ticket Base request

Each request related to ticket management has the following structure:

{
    "clientId": "xyzk",
    "userId": 123456,
    "transactionType": 2,
    "amount": 10.56,
    "ticket": {}
}
Parameter
Type
Description

clientId

String

Client id, provided by CmsWager

userId

Int

The client user Id

transactionType

Int

The transaction Type (see appendix)

amount

Decimal

The transaction amount

ticket

Object

Change for every request type

Content-Type

All requests content-type are "application/json"

PreviousErrorsNextApi Reference

Last updated 11 months ago