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
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)
Java example (all three steps)
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
Wire JSON — step 2
Same as step 1 with cashoutId "co-p2" and "percentage": "0.9".
Wire JSON — step 3
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"):
Common mistakes
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 in the parent manual.
Was this helpful?