> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/transaction30api/sandbox/user-manual/cashout_partial.md).

# cashout\_partial

**Goal:** Exercise the three partial-cashout sandbox steps for customer `customer_cashout_partial` (or magic ticketId `mock_cashout_partial`).

Sandbox modules: `cashout_partial_step1`, `cashout_partial_step2`, `cashout_partial_step3`. Prefer `sendCashoutInform`.

## Routing

| Step | Details builder                           | Percentage | Expected message          |
| ---- | ----------------------------------------- | ---------- | ------------------------- |
| 1    | `newTicketPartialCashoutDetailsBuilder()` | `0.6`      | `accepted;percentage=0.6` |
| 2    | `newTicketPartialCashoutDetailsBuilder()` | `0.9`      | `accepted;percentage=0.9` |
| 3    | `newTicketCashoutDetailsBuilder()` (full) | —          | `accepted`                |

## How to build the request (Java SDK)

{% stepper %}
{% step %}

### Wrap each step’s `CashoutRequest` in `CashoutInformRequest`.

{% endstep %}

{% step %}

### Steps 1–2: Use partial cashout details.

`CashoutDetails.newTicketPartialCashoutDetailsBuilder().setPercentage(new BigDecimal("0.6"|"0.9"))`
{% endstep %}

{% step %}

### Step 3: Use full ticket cashout details.

`CashoutDetails.newTicketCashoutDetailsBuilder()`
{% endstep %}

{% step %}

### Send the request.

`mbsSdk.getTicketProtocol().sendCashoutInform(request)`
{% endstep %}
{% endstepper %}

## Java example (all three steps)

```java
import com.sportradar.mbs.sdk.entities.cashout.CashoutDetails;
import com.sportradar.mbs.sdk.entities.payout.Payout;
import com.sportradar.mbs.sdk.entities.request.CashoutInformRequest;
import com.sportradar.mbs.sdk.entities.request.CashoutRequest;
import com.sportradar.mbs.sdk.entities.response.CashoutInformResponse;
import java.math.BigDecimal;

Payout payout = Payout.newCashPayoutBuilder()
    .setAmount(new BigDecimal("10"))
    .setCurrency("EUR")
    .build();

// Step 1 — percentage 0.6
CashoutInformResponse step1 = mbsSdk.getTicketProtocol().sendCashoutInform(
    CashoutInformRequest.newBuilder()
        .setCashout(CashoutRequest.newBuilder()
            .setCashoutId("co-p1")
            .setDetails(CashoutDetails.newTicketPartialCashoutDetailsBuilder()
                .setTicketId("mock_cashout_partial")
                .setTicketSignature("sandbox-signature")
                .setPercentage(new BigDecimal("0.6"))
                .setPayout(payout)
                .build())
            .build())
        .build());
// expect: ACCEPTED, message "accepted;percentage=0.6"

// Step 2 — percentage 0.9
CashoutInformResponse step2 = mbsSdk.getTicketProtocol().sendCashoutInform(
    CashoutInformRequest.newBuilder()
        .setCashout(CashoutRequest.newBuilder()
            .setCashoutId("co-p2")
            .setDetails(CashoutDetails.newTicketPartialCashoutDetailsBuilder()
                .setTicketId("mock_cashout_partial")
                .setTicketSignature("sandbox-signature")
                .setPercentage(new BigDecimal("0.9"))
                .setPayout(payout)
                .build())
            .build())
        .build());
// expect: ACCEPTED, message "accepted;percentage=0.9"

// Step 3 — full ticket cashout
CashoutInformResponse step3 = mbsSdk.getTicketProtocol().sendCashoutInform(
    CashoutInformRequest.newBuilder()
        .setCashout(CashoutRequest.newBuilder()
            .setCashoutId("co-p3")
            .setDetails(CashoutDetails.newTicketCashoutDetailsBuilder()
                .setTicketId("mock_cashout_partial")
                .setTicketSignature("sandbox-signature")
                .setPayout(payout)
                .build())
            .build())
        .build());
// expect: ACCEPTED, message "accepted"
```

## Wire JSON — step 1

```json
{
  "operatorId": 9985,
  "correlationId": "corr-1",
  "timestampUtc": 1710000000000,
  "operation": "cashout-inform",
  "version": "3.0",
  "content": {
    "type": "cashout-inform",
    "cashout": {
      "type": "cashout",
      "cashoutId": "co-p1",
      "details": {
        "type": "ticket-partial",
        "ticketId": "mock_cashout_partial",
        "ticketSignature": "sandbox-signature",
        "percentage": "0.6",
        "payout": [
          {
            "type": "cash",
            "amount": "10",
            "currency": "EUR"
          }
        ]
      }
    }
  }
}
```

## Wire JSON — step 2

Same as step 1 with `cashoutId` `"co-p2"` and `"percentage": "0.9"`.

## Wire JSON — step 3

```json
{
  "operatorId": 9985,
  "correlationId": "corr-3",
  "timestampUtc": 1710000000000,
  "operation": "cashout-inform",
  "version": "3.0",
  "content": {
    "type": "cashout-inform",
    "cashout": {
      "type": "cashout",
      "cashoutId": "co-p3",
      "details": {
        "type": "ticket",
        "ticketId": "mock_cashout_partial",
        "ticketSignature": "sandbox-signature",
        "payout": [
          {
            "type": "cash",
            "amount": "10",
            "currency": "EUR"
          }
        ]
      }
    }
  }
}
```

| Field name                           | Value                                                | Mandatory / Optional  | Data type       | Ignored by sandbox   |
| ------------------------------------ | ---------------------------------------------------- | --------------------- | --------------- | -------------------- |
| `operatorId`                         | `9985`                                               | Mandatory             | integer         | Yes                  |
| `operation`                          | `"cashout-inform"`                                   | Mandatory             | string          | No                   |
| `content.type`                       | `"cashout-inform"`                                   | Mandatory             | string          | No                   |
| `content.cashout.details.type`       | `"ticket-partial"` (steps 1–2) / `"ticket"` (step 3) | Mandatory             | string          | No (routing)         |
| `content.cashout.details.ticketId`   | `"mock_cashout_partial"`                             | Mandatory (sandbox)   | string          | No (routing; echoed) |
| `content.cashout.details.percentage` | `"0.6"` / `"0.9"`                                    | Mandatory (steps 1–2) | string          | No (routing)         |
| `content.cashout.details.payout`     | *(cash)*                                             | Mandatory             | array of object | Yes                  |

Magic map: `mock_cashout_partial` → `customer_cashout_partial`.

## Expected responses

| Step | `getStatus()` | `getCode()` | `getMessage()`            |
| ---- | ------------- | ----------- | ------------------------- |
| 1    | `ACCEPTED`    | `0`         | `accepted;percentage=0.6` |
| 2    | `ACCEPTED`    | `0`         | `accepted;percentage=0.9` |
| 3    | `ACCEPTED`    | `0`         | `accepted`                |

Example wire reply (step 1; content type `"cashout-inform-reply"`):

```json
{
  "correlationId": "corr-1",
  "timestampUtc": 1710000001000,
  "operation": "cashout-inform",
  "version": "3.0",
  "content": {
    "type": "cashout-inform-reply",
    "cashoutId": "co-p1",
    "ticketId": "mock_cashout_partial",
    "status": "accepted",
    "code": 0,
    "message": "accepted;percentage=0.6",
    "signature": "sandbox-signature"
  }
}
```

## Common mistakes

| Mistake                                     | Result                                                                        |
| ------------------------------------------- | ----------------------------------------------------------------------------- |
| Cancel percentages `0.5` / `0.8` on cashout | Do not match cashout partial routes → `-999`                                  |
| Step 3 still `ticket-partial`               | Misses step 3 full-cashout route                                              |
| Using `sendCashout` without realizing it    | Still routes to the same cashout\_\* modules (inform is preferred in goldens) |

See also: [Error responses](broken://pages/3cdf760ce49fd6992d47d7772f4a4b9f67f0519f#error-responses) in the parent manual.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sportradar.com/transaction30api/sandbox/user-manual/cashout_partial.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
