---
title: "cancel_full_accepted"
canonical_url: "https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_accepted"
markdown_url: "https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_accepted.md"
last_updated: "2026-11-11T13:15:15Z"
---

# cancel_full_accepted

**Goal:** Send a full ticket cancel and receive an **accepted** cancel reply (sandbox also fills an accepted cancel-ack in the same underlying reply).

Sandbox module name: `cancel_full_accepted`.

## How to build the request (Java SDK)

1. **Build  with a unique **

2. **Set full ticket cancel details**

   Use `CancelDetails.newTicketCancelDetailsBuilder()` (JSON type `"ticket"`) for a full cancel, not a partial cancel.

3. **Route the request**

   Use either:

   - **Magic `ticketId`:** `"mock_cancel_accepted"` (preferred for pure Ticket 3.0 / SDK clients; no punter required), or
   - **`meta.punter.id`:** `"customer_cancel_accepted"` with any normal `ticketId` (dataplane Transaction).

4. **Set **

   Ticket 3.0 requires a ticket signature on cancel details.

5. **Send the request**

   ```java
   mbsSdk.getTicketProtocol().sendCancel(request)
   ```

`CancelRequest` has no ticket `context` / mobile channel — those apply only when a nested ticket context appears (placement, max-stake, ticket-inform).

## Java example

```java
import com.sportradar.mbs.sdk.entities.cancellation.CancelDetails;
import com.sportradar.mbs.sdk.entities.common.AcceptanceStatus;
import com.sportradar.mbs.sdk.entities.request.CancelRequest;
import com.sportradar.mbs.sdk.entities.response.CancelResponse;

CancelRequest request = CancelRequest.newBuilder()
    .setCancellationId("cncl-1")
    .setDetails(CancelDetails.newTicketCancelDetailsBuilder()
        .setTicketId("mock_cancel_accepted")
        .setTicketSignature("sandbox-signature")
        .build())
    .build();

CancelResponse response = mbsSdk.getTicketProtocol().sendCancel(request);
// expect: response.getStatus() == AcceptanceStatus.ACCEPTED, getCode() == 0
```

Equivalent routing without a magic id: keep any `ticketId` and ensure the sandbox Transaction has `meta.punter.id` = `"customer_cancel_accepted"`.

## Wire JSON (what the SDK sends)

```json
{
  "operatorId": 9985,
  "correlationId": "corr-1",
  "timestampUtc": 1710000000000,
  "operation": "ticket-cancel",
  "version": "3.0",
  "content": {
    "type": "cancel",
    "cancellationId": "cncl-1",
    "details": {
      "type": "ticket",
      "ticketId": "mock_cancel_accepted",
      "ticketSignature": "sandbox-signature"
    }
  }
}
```

| Field name                        | Value                    | Mandatory / Optional | Data type | Ignored by sandbox                |
| --------------------------------- | ------------------------ | -------------------- | --------- | --------------------------------- |
| `operatorId`                      | `9985`                   | Mandatory            | integer   | Yes                               |
| `correlationId`                   | `"corr-1"`               | Mandatory            | string    | No (echoed in reply)              |
| `timestampUtc`                    | `1710000000000`          | Mandatory            | integer   | Yes                               |
| `operation`                       | `"ticket-cancel"`        | Mandatory            | string    | No                                |
| `version`                         | `"3.0"`                  | Mandatory            | string    | No (echoed in reply)              |
| `content.type`                    | `"cancel"`               | Mandatory            | string    | No                                |
| `content.cancellationId`          | `"cncl-1"`               | Mandatory            | string    | No (echoed in reply)              |
| `content.details.type`            | `"ticket"`               | Mandatory            | string    | No (routing: full cancel)         |
| `content.details.ticketId`        | `"mock_cancel_accepted"` | Mandatory (sandbox)  | string    | No (routing via magic id; echoed) |
| `content.details.ticketSignature` | `"sandbox-signature"`    | Mandatory            | string    | Yes                               |

**Ignored by sandbox** means the field is not used for routing and not used when building the reply (schema-only for the WebSocket / Ticket 3.0 envelope). Magic map: `mock_cancel_accepted` → `customer_cancel_accepted`.

## Expected response

On the Java client, assert against `CancelResponse` (`sendCancel`):

| Java getter           | Expected value                  |
| --------------------- | ------------------------------- |
| `getStatus()`         | `AcceptanceStatus.ACCEPTED`     |
| `getCode()`           | `0`                             |
| `getMessage()`        | `"accepted"` (sandbox)          |
| `getCancellationId()` | `"cncl-1"` (echo)               |
| `getTicketId()`       | `"mock_cancel_accepted"` (echo) |

Wire JSON (content type `"cancel-reply"`):

```json
{
  "correlationId": "corr-1",
  "timestampUtc": 1710000001000,
  "operation": "ticket-cancel",
  "version": "3.0",
  "content": {
    "type": "cancel-reply",
    "cancellationId": "cncl-1",
    "ticketId": "mock_cancel_accepted",
    "status": "accepted",
    "code": 0,
    "message": "accepted",
    "signature": "sandbox-signature"
  }
}
```

> **Info**
>
> The sandbox also fills an **accepted cancel-ack** (same `cancellationId` / `ticketId` / message) in the same internal reply. `sendCancel` surfaces the cancel-reply as `CancelResponse`.
>
> Assert on `getStatus()`, `getCode()`, and `getMessage()`.

## Common mistakes

| Mistake                                                                               | Result                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Wrong / missing magic `ticketId` and no `meta.punter.id` = `customer_cancel_accepted` | Fallback rejection (`-999`)                                                                                                                                                                |
| Using `newTicketPartialCancelDetailsBuilder()`                                        | Routes to partial-cancel scenarios (or fallback)                                                                                                                                           |
| Expecting reject `-2013`                                                              | That is [`cancel_full_rejected`](https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual/cancel_full_rejected.md) (`mock_cancel_rejected` / `customer_cancel_rejected`) |

See also: [Error responses](https://docs.sportradar.com/resources/transaction/docs/sandbox/user-manual.md#error-responses) in the parent manual.
