External Settlement Request and Response (Including Rejection)

The example below is based on a Ticket placement request that also includes some external content.

Ticket Placement Request
{
  "operatorId": 9985,
  "content": {
    "type": "ticket",
    "ticketId": "Ticket_3668",
    "bets": [
      {
        "betId": "Ticket_3668_bet_0",
        "selections": [
          {
            "type": "external",
            "event": "ext:match:736977",
            "expSettleTime": 1691581504000,
            "outcome": "ext-pre:9985:s77",
            "odds": {
              "type": "decimal",
              "value": "7.1"
            }
          },
          {
            "type": "uf",
            "productId": "1",
            "eventId": "sr:match:15163591",
            "marketId": "1",
            "outcomeId": "2",
            "specifiers": "hcp=1:0",
            "odds": {
              "type": "decimal",
              "value": "1.48"
            }
          }
        ],
        "stake": [
          {
            "type": "cash",
            "currency": "EUR",
            "amount": "50"
          }
        ]
      },
      {
        "betId": "Ticket_3668_bet_1",
        "selections": [
         {
           "type": "uf",
           "productId": "3",
           "eventId": "sr:season:55413",
           "marketId": "534",
           "outcomeId": "pre:outcometext:9919",
           "specifiers": "variant=pre:markettext:60279",
           "odds": {
             "type": "decimal",
             "value": "1.1"
           }
         }
       ],
        "stake": [
          {
            "type": "cash",
            "currency": "EUR",
            "amount": "10"
          }
        ]
      }
    ],
    "context": {
      "channel": {
        "type": "retail",
        "shopId": "shop_789135"
      },
      "limitId": 1409
    }
  },
  "correlationId": "tD01Nm532",
  "timestampUtc": 1679060042000,
  "operation": "ticket-placement",
  "version": "3.0"
}

The settlement for the selection with external content is done by the External settlement request (below). It contains a reference to the corresponding ticket, bet ("betId": "Bet_ewe80D1dQw") and the amount won by this selection(s) (the amount is zero in case of a losing selection(s)). The External settlement request must be sent no later than 30 days after the date reported in the "expSettleTime" field of the original Ticket placement request (otherwise the bet will be automatically settled as lost by MTS).

External Settlement Request
{
  "operatorId": 9985,
  "content": {
    "type": "ext-settlement",
    "settlementId": "SETL3134413498778",
    "details": {
      "type": "bet",
      "ticketId": "Ticket_3668",
      "ticketSignature": "IEzuiEl82X+SmjWB3xDB0AIB6fUZVFOvmGKm6Rcvxm0=",
      "betId": "Ticket_3668_bet_0",
      "payout": [
        {
            "type": "cash",
            "currency": "EUR",
            "amount": "11.45",
            "traceId": "Source_8963"
        }
      ]
    }
  },
  "correlationId": "6kxT98Sj3",
  "timestampUtc": 1678883043000,
  "operation": "ticket-ext-settlement",
  "version": "3.0"
}
External Settlement Response
{
  "content": {
    "type": "ext-settlement-reply",
    "settlementId": "SETL3134413498778",
    "signature": "mHFX4dXMq4b3aqnVbgiFL06LlHZTU4pj7Qn8rYnmLgA=",
    "status": "accepted",
    "ticketId": "Ticket_3668",
    "code": 0,
    "message": "Transaction processed"
  },
  "correlationId": "6kxT98Sj3",
  "timestampUtc": 1691750043000,
  "operation": "ticket-ext-settlement",
  "version": "3.0"
}

Rejection example

This is an example of a negative response from MTS. In this case, the request is rejected because some other selections (of the same bet) with Sportradar content have already been settled as lost. For available External settlement response codes, see here.

External Settlement Response - Rejection
{
  "content": {
    "type": "ext-settlement-reply",
    "settlementId": "SETL3134413498778",
    "signature": "mHFX4dXMq4b3aqnVbgiFL06LlHZTU4pj7Qn8rYnmLgA=",
    "status": "rejected",
    "ticketId": "Ticket_3668",
    "code": -207,
    "message": "External settlement sent for ticket with losing Sportradar content selection(s)"
  },
  "correlationId": "6kxT98Sj3",
  "timestampUtc": 1691750043000,
  "operation": "ticket-ext-settlement",
  "version": "3.0"
}

Last updated

Was this helpful?