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"

Last updated