# Cash-out Build Request and Response

This is an example of a Cashout Build request (for a complete ticket) and a Cashout Build Reply response (including the Payout With Source object).\
The first request is rejected, but the repeated request is eventually accepted.

<details>

<summary><strong>Cash-out Build Request</strong></summary>

```json
{
  "operatorId": 9985,
  "content": {
    "type": "cashout-build",
    "cashout": {
      "type": "cashout",
      "cashoutId": "cashoutBuild1",
      "details": {
        "type": "ticket",
        "ticketId": "Ticket_20260319124836_143",
        "ticketSignature": "2cKGb98l7+N0D5zgrxz8yQXRT4ExmHannpbKcyI/8jb+AWMHzRBkPkItsgqoEyNKmL3Ii1bNqATnJSyE",
        "code":100,
        "payout": [
          {
            "type": "cash",
            "currency": "EUR",
            "amount": "9.5"
          }
        ]
      }
    }
  },
  "correlationId": "corr1",
  "timestampUtc": 1773925546000,
  "operation": "cashout-build",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Cash-out Build Response (Rejected)</strong></summary>

```json
{
  "content": {
    "type": "cashout-build-reply",
    "message": "Requested cash-out amount '9.5' EUR exceeds the maximum allowed amount of '8.5397855' EUR.",
    "code": -204,
    "signature": "Q8w3dC8QvyTefjy15duzfMyKzJ7K7KrFYhe9S8nxOpjBVMzYTKFbZh+CgjoYlWC8CIoUDfEg5leaG6cW",
    "ticketId": "Ticket_20260319124836_143",
    "status": "rejected",
    "cashoutId": "cashoutBuild1",
    "ltd": {
      "modelSuggestedLtd": "Delay",
      "configuredLtd": 3,
      "suggestedLtd": 9,
      "accountLbsLtdOffset": 0,
      "liveSelectionLtdOffset": 0,
      "appliedLtd": 3
    },
    "cashout": {
      "cashoutType": "ticket",
      "cashoutId": "cashoutBuild1",
      "maxPayout": [
        {
          "type": "cash",
          "amount": "15.8",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ],
      "fairCashout": [
        {
          "type": "cash",
          "amount": "6.89046092",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ],
      "cashout": [
        {
          "type": "cash",
          "amount": "8.5397855",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ]
    },
    "endCustomerSuggestions": {
      "endCustomer": {
        "id": "user123"
      },
      "appliedConfidence": "1.0",
      "suggestedConfidence": "1.0",
      "suggestedMarkerScore": "0.02930000051856041",
      "suggestedBotScore": "0.00019999999494757503"
    },
    "channelSuggestions": {},
    "betDetails": [
      {
        "betId": "Bet_20260319124836_143_0",
        "selectionDetails": [
          {
            "selection": {
              "type": "uf",
              "productId": "3",
              "eventId": "sr:match:61730120",
              "marketId": "880",
              "specifiers": "",
              "outcomeId": "74",
              "odds": {
                "type": "decimal",
                "value": "1.58000000"
              }
            },
            "appliedEventRating": 4,
            "suggestedEventRating": 0,
            "configuredLtd": 12,
            "suggestedLtd": 9,
            "appliedMarketFactor": "0.3",
            "currentProbability": {
              "type": "win",
              "win": "0.4361051217"
            },
            "currentResult": {
              "type": "unsettled"
            }
          }
        ],
        "payout": [],
        "settledPercentage": "0.0"
      }
    ],
    "exchangeRate": [
      {
        "fromCurrency": "EUR",
        "toCurrency": "EUR",
        "rate": "1.0"
      }
    ]
  },
  "correlationId": "corr1",
  "timestampUtc": 1773925722580,
  "operation": "cashout-build",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Cash-out Build Request</strong></summary>

```json
{
  "operatorId": 9985,
  "content": {
    "type": "cashout-build",
    "cashout": {
      "type": "cashout",
      "cashoutId": "cashoutBuild2",
      "details": {
        "type": "ticket",
        "ticketId": "Ticket_20260319124836_143",
        "ticketSignature": "2cKGb98l7+N0D5zgrxz8yQXRT4ExmHannpbKcyI/8jb+AWMHzRBkPkItsgqoEyNKmL3Ii1bNqATnJSyE",
        "code":100,
        "payout": [
          {
            "type": "cash",
            "currency": "EUR",
            "amount": "8.5"
          }
        ]
      }
    }
  },
  "correlationId": "corr2",
  "timestampUtc": 1773926039000,
  "operation": "cashout-build",
  "version": "3.0"
}
```

</details>

<details>

<summary><strong>Cash-out Build Response (Accepted)</strong></summary>

```json
{
  "content": {
    "type": "cashout-build-reply",
    "message": "Transaction processed.",
    "code": 0,
    "signature": "tSwLa4P/a3vWwXCtV9e5lVqBsDdV3hUiRxcBPyW86OX+9ajSa08APAIJ/GeDP5YLW0Zq9244SzlprLeP",
    "ticketId": "Ticket_20260319124836_143",
    "status": "accepted",
    "cashoutId": "cashoutBuild2",
    "ltd": {
      "modelSuggestedLtd": "Delay",
      "configuredLtd": 3,
      "suggestedLtd": 9,
      "accountLbsLtdOffset": 0,
      "liveSelectionLtdOffset": 0,
      "appliedLtd": 3
    },
    "cashout": {
      "cashoutType": "ticket",
      "cashoutId": "cashoutBuild2",
      "maxPayout": [
        {
          "type": "cash",
          "amount": "15.8",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ],
      "fairCashout": [
        {
          "type": "cash",
          "amount": "7.02163373",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ],
      "cashout": [
        {
          "type": "cash",
          "amount": "8.89514137",
          "currency": "EUR",
          "traceId": "",
          "source": "cash",
          "stakeOrigin": "cash"
        }
      ]
    },
    "endCustomerSuggestions": {
      "endCustomer": {
        "id": "user123"
      },
      "appliedConfidence": "1.0",
      "suggestedConfidence": "1.0",
      "suggestedMarkerScore": "0.02930000051856041",
      "suggestedBotScore": "0.00019999999494757503"
    },
    "channelSuggestions": {},
    "betDetails": [
      {
        "betId": "Bet_20260319124836_143_0",
        "selectionDetails": [
          {
            "selection": {
              "type": "uf",
              "productId": "3",
              "eventId": "sr:match:61730120",
              "marketId": "880",
              "specifiers": "",
              "outcomeId": "74",
              "odds": {
                "type": "decimal",
                "value": "1.58000000"
              }
            },
            "appliedEventRating": 4,
            "suggestedEventRating": 0,
            "configuredLtd": 12,
            "suggestedLtd": 9,
            "appliedMarketFactor": "0.3",
            "currentProbability": {
              "type": "win",
              "win": "0.4444071982"
            },
            "currentResult": {
              "type": "unsettled"
            }
          }
        ],
        "payout": [],
        "settledPercentage": "0.0"
      }
    ],
    "exchangeRate": [
      {
        "fromCurrency": "EUR",
        "toCurrency": "EUR",
        "rate": "1.0"
      }
    ]
  },
  "correlationId": "corr2",
  "timestampUtc": 1773926080623,
  "operation": "cashout-build",
  "version": "3.0"
}

```

</details>


---

# 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/mts/transaction-3.0-api/mts-related-transaction-examples/cashout-examples/cash-out-build-request-and-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.
