# External Settlement Response

<table><thead><tr><th width="114.609375" align="center">Destination</th><th width="54.75262451171875" align="center"></th><th width="115.19964599609375" align="center">Source</th></tr></thead><tbody><tr><td align="center"><strong>Client</strong></td><td align="center"><strong>←</strong></td><td align="center"><strong>MTS</strong></td></tr></tbody></table>

**Envelope and Content table:**

The envelope provides the content's (External settlement response) context and contains the following fields (besides Content):

* correlationId
* timestampUtc
* operation
* version

<table data-full-width="true"><thead><tr><th width="351">Example</th><th width="140.7265625">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>{
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre><code>  "content": {
       ...........
       ...........
  },   
</code></pre></td><td>content</td><td>See Content object description below</td><td>M</td><td>Object</td></tr><tr><td><pre><code>  "correlationId": "udD52Xk985B",
</code></pre></td><td>correlationId</td><td>Client defined string to facilitate the request-response pairing,<br>Sportradar is obliged to return the same string in every response</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "timestampUtc": 1678354437000,
</code></pre></td><td>timestampUtc</td><td>Timestamp of ticket placement as submitted by the client (Unix time in milliseconds format),<br>minimal: 1,<br>maximum: 9223372036854776000</td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>  "operation": "ticket-ext-settlement",
</code></pre></td><td>operation</td><td>Declaration of ticket content type, should be "ticket-ext-settlement" in case of External settlement response</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "version": "3.0"
</code></pre></td><td>version</td><td>Indicates the ticket format version</td><td>M</td><td>String</td></tr><tr><td>}</td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>

### Content object (External settlement response) <a href="#mtsexternalsettlementresponse-v3.0-contentcontentobject-externalsettlementresponse" id="mtsexternalsettlementresponse-v3.0-contentcontentobject-externalsettlementresponse"></a>

The Content object includes the following fields:

* type
* settlementId
* signature
* status
* ticketId
* code
* message

**Please note** that in the case of major ticket errors or internal system errors, the content object has a different structure and contains "type": "error-reply" instead of "type": "ext-settlement-reply. For description, see [Error-reply Response](/transaction30api/api-description/ticket-json-format-description/error-reply-response.md).

**Content object table:**

<table data-full-width="true"><thead><tr><th width="351">Example</th><th width="134.103271484375">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>"content": {
</code></pre></td><td><br></td><td><br></td><td><br></td><td>Object</td></tr><tr><td><pre><code>    "type": "ext-settlement-reply",
</code></pre></td><td>type</td><td><p>Declaration of the content type, should be "ext-settlement-reply" in the case of External settlement response</p><p>or "error-reply" in the case of major ticket errors or internal system errors (see also Error-reply Response).</p></td><td>M</td><td>String</td></tr><tr><td><pre data-overflow="wrap"><code>    "settlementId": "SETL3134413498778", 
</code></pre></td><td>settlementId</td><td>ID from the corresponding request, minimal string length = 1,<br>maximum string length = 128</td><td>O</td><td>String</td></tr><tr><td><pre><code>    "signature": "phe8l4ICKBFofBI
</code></pre><pre><code>gkim2mhx6wZN8xbbrNss8gsOqOw4=",
</code></pre></td><td>signature</td><td>String calculated and sent by MTS to be used as a proof that the response has actually been provided by MTS,<br>minimal string length = 1,<br>maximum string length = 128</td><td>M</td><td>String</td></tr><tr><td><pre><code>    "status": "rejected",
</code></pre></td><td>status</td><td><p>Request outcome, enumerator:</p><ul><li>accepted</li><li>rejected</li></ul></td><td>M</td><td><br></td></tr><tr><td><pre><code>    "ticketId": "Ticket_3690",
</code></pre></td><td>ticketId</td><td>ID of the initial ticket (defined by client) which is to be affected with this cash-out</td><td>M</td><td>String</td></tr><tr><td><pre><code>    "code": -205,    
</code></pre></td><td>code</td><td>External settlement response code,<br>see list of codes below</td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>    "message": "Non-SR settle on fully SR ticket"
</code></pre></td><td>message</td><td>Readable ticket response validation code, minimal string length = 1,<br>maximum string length = 128</td><td>O</td><td>String</td></tr><tr><td>}</td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>

### External settlement response codes <a href="#mtsexternalsettlementresponse-v3.0-externalsettlementresponsecodes" id="mtsexternalsettlementresponse-v3.0-externalsettlementresponsecodes"></a>

<table><thead><tr><th width="207.185791015625">Code</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>0
</code></pre></td><td>Transaction processed</td></tr><tr><td><pre><code>-101
</code></pre></td><td>Client (bookmaker) not found</td></tr><tr><td><pre><code>-102
</code></pre></td><td>External content disabled</td></tr><tr><td><pre><code>-103
</code></pre></td><td>Ticket not found</td></tr><tr><td><pre><code>-104
</code></pre></td><td>Ticket rejected</td></tr><tr><td><pre><code>-201
</code></pre></td><td>Ticket version lower than 3.0</td></tr><tr><td><pre><code>-204
</code></pre></td><td>External settlement too high</td></tr><tr><td><pre><code>-205 
</code></pre></td><td>External settlement sent for ticket including only Sportradar content</td></tr><tr><td><pre><code>-206 
</code></pre></td><td>External settlement sent for ticket with unknown result</td></tr><tr><td><pre><code>-207 
</code></pre></td><td>External settlement sent for ticket with losing Sportradar content selection(s)</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/transaction30api/api-description/ticket-json-format-description/external-content-description/external-settlement-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
