Goal: Exercise the three partial-cancel sandbox steps for customer customer_cancel_partial (or magic ticketId mock_cancel_partial).
Sandbox modules: cancel_partial_step1, cancel_partial_step2, cancel_partial_step3.
| Step | Details builder | Percentage | Expected message |
|---|---|---|---|
| 1 | newTicketPartialCancelDetailsBuilder() | 0.5 | accepted;percentage=0.5 |
| 2 | newTicketPartialCancelDetailsBuilder() | 0.8 | accepted;percentage=0.8 |
| 3 | newTicketCancelDetailsBuilder() (full) | — | accepted |
Route with mock_cancel_partial as ticketId, or meta.punter.id = "customer_cancel_partial".
Use a unique cancellationId for each call.
Use CancelDetails.newTicketPartialCancelDetailsBuilder() with percentage 0.5.
Use CancelDetails.newTicketPartialCancelDetailsBuilder() with percentage 0.8.
Send each step with mbsSdk.getTicketProtocol().sendCancel(request).
import com.sportradar.mbs.sdk.entities.cancellation.CancelDetails;
import com.sportradar.mbs
{
"operatorId": 9985,
"correlationId": "corr-1",
"timestampUtc": 1710000000000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel",
"cancellationId
Same as step 1 with cancellationId "cncl-p2" and "percentage": "0.8".
{
"operatorId": 9985,
"correlationId": "corr-3",
"timestampUtc": 1710000000000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel",
"cancellationId"
Magic map: mock_cancel_partial → customer_cancel_partial. Percentage facet is the float parsed from the string (0.5 / 0.8).
Example wire reply (step 1; content type "cancel-reply"):
{
"correlationId": "corr-1",
"timestampUtc": 1710000001000,
"operation": "ticket-cancel",
"version": "3.0",
"content": {
"type": "cancel-reply",
"cancellationId": "cncl-p1",
"ticketId
| Mistake | Result |
|---|---|
Percentage 0.6 / 0.9 on cancel | Those percentages belong to cashout_partial; cancel falls through to -999 |
Step 3 still using ticket-partial | Does not match step 3 route (ticket + customer_cancel_partial) |
| Wrong magic id | Fallback or a different cancel scenario |
See also: Error responses in the parent manual.
Switch to CancelDetails.newTicketCancelDetailsBuilder() for a full ticket cancel.
| Field name | Value | Mandatory / Optional | Data type | Ignored by sandbox |
|---|---|---|---|---|
operatorId | 9985 | Mandatory | integer | Yes |
correlationId | (string) | Mandatory | string | No (echoed in reply) |
timestampUtc | (integer) | 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 | per step | Mandatory | string | No (echoed in reply) |
content.details.type | "ticket-partial" (steps 1–2) / "ticket" (step 3) | Mandatory | string | No (routing) |
content.details.ticketId | "mock_cancel_partial" | Mandatory (sandbox) | string | No (routing; echoed) |
content.details.percentage | "0.5" / "0.8" | Mandatory (steps 1–2) | string | No (routing) |
content.details.ticketSignature | "sandbox-signature" | Mandatory | string | Yes |
| Step | getStatus() | getCode() | getMessage() |
|---|---|---|---|
| 1 | ACCEPTED | 0 | accepted;percentage=0.5 |
| 2 | ACCEPTED | 0 | accepted;percentage=0.8 |
| 3 | ACCEPTED | 0 | accepted |