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.
Use CancelDetails.newTicketCancelDetailsBuilder() (JSON type "ticket") for a full cancel, not a partial cancel.
Use either:
ticketId: "mock_cancel_accepted" (preferred for pure Ticket 3.0 / SDK clients; no punter required), ormeta.punter.id: "customer_cancel_accepted" with any normal ticketId (dataplane Transaction).Ticket 3.0 requires a ticket signature on cancel details.
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).
import com.sportradar.mbs.sdk.entities.cancellation.CancelDetails;
import com.sportradar.mbs.sdk.entities.common.AcceptanceStatus;
import com.sportradar.mbs.sdk.entities.request
Equivalent routing without a magic id: keep any ticketId and ensure the sandbox Transaction has meta.punter.id = "customer_cancel_accepted".
{
"operatorId": 9985,
"correlationId": "corr-1",
"timestampUtc": 1710000000000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel",
"cancellationId"
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.
On the Java client, assert against CancelResponse (sendCancel):
Wire JSON (content type "cancel-reply"):
{
"correlationId": "corr-1",
"timestampUtc": 1710000001000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel-reply",
"cancellationId": "cncl-1",
"ticketId
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().
| 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 (mock_cancel_rejected / customer_cancel_rejected) |
See also: Error responses in the parent manual.
| 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 |
| Java getter | Expected value |
|---|---|
getStatus() | AcceptanceStatus.ACCEPTED |
getCode() | 0 |
getMessage() | "accepted" (sandbox) |
getCancellationId() | "cncl-1" (echo) |
getTicketId() | "mock_cancel_accepted" (echo) |