Cash-out Requests
Client
→
MTS
Cash-out request types
Cash-out Inform (operation: "cashout-inform") - This request is sent to MTS when the client wants to inform MTS that a particular cash-out event has occurred. The client does not expect a validation of this cash-out event. However, MTS does perform a basic check of the values received, such as whether the current potential win has been exceeded.
Cash-out Build (operation: "cashout-build") - This request is optional and may be sent over by the client once or several times whenever the client wants to obtain information about a potential cash-out event (for example when the client is preparing a cash-out offer to its bettor).
Cash-out Placement is sent to MTS when the client expects MTS to provide a full validation of a cash-out event, including a validation result (accepted/rejected).
The "ticket-cashout" operation and "cashout" content type will be deprecated. Do not use them in new projects, use "cashout-inform" instead. Currently, the old types are still accepted to maintain compatibility.

Description of cash-out request handling
MTS supports cash-out requests regarding cash-outs of live and pre-match bets and for singles, multiples and system bets. A Cash-out request will be accepted by MTS if the following conditions are met:
MTS must manage events from a risk management perspective
Ticket cash-out value is equal to or less than the maximum ticket value (Ticket Total Stake * Ticket Total Odds)
Ticket Total Stake – Stake amount in the original ticket
Ticket Total Odds – Product of all selection odds in the original ticket
A ticket can be cashed-out in its entire or partial value. In the case of partial cash-out, a portion of the ticket’s current value is paid out to the end customer (bettor), while the remaining part still depends on the event's outcome. In this case, apart from the cash-out amount, the Cash-out request must also include the ratio of the ticket the end customer has cashed out (field "percentage"). MTS will validate if the provided cash-out value is equal to or lower than the same ratio of the maximum possible payout of the ticket.
Clients can send as many partial cash-out requests as they wish, provided that the cash-out amount and ratio of each cash-out request include the values of all previous cash-out requests. MTS does not aggregate cash-out amount and ratio values of individual requests and treats the last request as if there were no previous requests.
Using different types of the Cash-out details object makes it possible to cash out – fully or partially – a single bet or a subset of bets within a multi-bet ticket, with custom cash-out ratios for each bet.
Envelope and Content table:
The Envelope provides the content's (cash-out request) context and contains the following fields (besides Content):
operatorId
correlationId
timestampUtc
operation
version
{
"operatorId": 9985,
operatorId
ID to uniquely identify the client from which the ticket originated, ID is provided to the client by Sportradar, The client is obliged to include it in every ticket
M
Integer
"correlationId": "ds7w32ndsJg2",
correlationId
Client defined string to facilitate the request-response pairing, Sportradar is obliged to return the same string in every response
M
String
"timestampUtc": 1678273428000,
timestampUtc
Timestamp of ticket placement as submitted by the client (Unix time in milliseconds format), minimal: 1, maximum: 9223372036854776000
M
Integer
"operation": "cashout-inform",
operation
Declaration of ticket content type, can be "cashout-inform" or "cashout-build" or "cashout-placement"
M
String
"version": "3.0"
version
Indicates the ticket format version
M
String
}
Content object
The fields for each type of cash-out request are described in the following tables.
Cashout Inform content object table
"content": {
Object
"type": "cashout-inform",
type
Declaration of content type
M
String
"validation": {
validation
Cash-out validation information as provided by the client
M
Object
"code": 1100,
code
Cash-out validation code as provided by the client, minimum = -1000000, maximum = 100000
M
Integer
"message": "Validated, OK",
message
Readable cash-out validation message as provided by the client, minimal string length = 1, maximum string length = 128
M
String
"rejected": false
rejected
Clients' indication if the cash-out has been rejected on the client side (missing field means not rejected)
O
Boolean
}
},
Cashout Build content object table
"content": {
Object
"type": "cashout-build",
type
Declaration of content type
M
String
},
Cashout Placement content object table
"content": {
"type": "cashout-placement",
type
Declaration of content type
},
Cashout object
The Cashout object contains the following fields:
type
cashoutId
details
Cashout object table:
"cashout": {
Object
"type": "cashout",
type
Declaration of type
M
String
"cashoutId": "COUT92328",
cashoutId
Unique ID of this particular cash-out request in client's system, referenced in eventual ack message, minimal string length = 1, maximum string length = 128
O
String
"details": {
details
Cash-out details - additional information related to the transaction,
see description
M
Object
"type": .......
type
M
String
..............
.............
},
Details object
1. Details ("type": "ticket") table
This type is used to cash out an entire ticket.
Fields:
type
ticketId
ticketSignature
code
payout
"details": {
Object
"type": "ticket",
type
Defines the type of Cash-out details
M
String
"ticketId": "Ticket_3690",
ticketId
ID of the original ticket that is to be affected by this cash-out request
M
String
"ticketSignature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
"payout": [
payout
Session payout array, minimal number of payouts per session =1, maximum number = 5
M
Array
{
"type": "cash",
type
Enumerator:
cash
withheld
M
String
"currency": "EUR",
currency
3 or 4 letter currency code, BTC and mBTC are also supported (4 letters only apply to mBTC). For more details please check https://www.iso.org/iso-4217-currency-codes.html
M
String
"amount": "100",
amount
String pattern: 1 up to 8 digits, optionally followed by a decimal point and 1 up to 8 digits, Java regex: ^\\d{1,8}(\\.\\d{1,8})?$
M
String
"traceId": "Source_2099"
traceId
A string to help identify the source of operation/action/state
Minimal string length = 1, maximum length = 128,
O
String
} ] },
2. Details ("type": "ticket-partial") table
This type is used to cash out only a portion of the ticket.
Fields:
type
ticketId
ticketSignature
code
percentage
payout
"details": {
Object
"type": "ticket-partial",
type
Defines the type of cash-out details
M
String
"ticketId": "Ticket_3690",
ticketId
ID of the original ticket that is to be affected by this cash-out request
M
String
"ticketSignature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
"percentage": "0.6",
percentage
Proportion of the bet that is to be cashed-out, format: up to 8 decimal places after a zero and decimal point, has to be passed as a decimal (i.e. 0.6 and not 60), Java regex: ^0(\\.\\d{1,8})?$
M
String
"payout": [
payout
See description
M
Array
...........
...........
] },
3. Details ("type": "bet") table
This type is used to cash out an entire bet.
Fields:
type
ticketId
ticketSignature
betId
code
payout
"details": {
Object
"type": "bet",
type
Defines the type of cash-out details
M
String
"ticketId": "Ticket_3690",
ticketId
ID of the original ticket that is to be affected by this cash-out request
M
String
"ticketSignature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
"betId": "bjda6GH",
bettId
ID of the initial bet (defined by client) which is to be affected with this cash-out
M
String
"payout": [
payout
See description
M
Array
...........
...........
] },
4. Details ("type": "bet-partial") table
This type is used to cash out a portion of a bet.
Fields:
type
ticketId
ticketSignature
betId
code
percentage
payout
"details": {
Object
"type": "bet-partial",
type
Defines the type of cash-out details
M
String
"ticketId": "Ticket_3690",
ticketId
ID of the original ticket that is to be affected by this cash-out request
M
String
"ticketSignature": "HHDut7XIEl+SmjWB3x
DB0AIB6fUZVFOvmGKm6Rcvxm0=",
ticketSignature
Signature from MTS's response to initial ticket placement
M
String
"betId": "bjda6GH",
betId
ID of the initial bet (defined by client) which is to be affected with this cash-out
M
String
"percentage": "0.8",
percentage
Proportion of the bet that is to be cashed-out, format: up to 8 decimal places after a zero and decimal point, has to be passed as a decimal (i.e. 0.8 and not 80), Java regex: ^0(\\.\\d{1,8})?$
M
String
"payout": [
payout
See description
M
Array
...........
...........
] },
Last updated
Was this helpful?