CashOut
CashOut is a player's opportunity to cancel their bet and get the money back before a sport event ends. CashOut is calculated based on a player's chance to win or lose and changes throughout the entire sport event in Live or Prematch mode. The lower the odds of an outcome are, the higher a player's chance to win is, and the greater the amount of CashOut is.
CashOut availability
The CashOut feature is available for all types of sports, single and express (combo) bets in both Live and Prematch modes, according to your trading configurations. You can fine-tune the CashOut settings and disable it for specific sport events if needed.
Chance - is the probability of a player's bet to win or lose in a sport event; it depends on outcome coefficients.
Full scheme of the bet and cash-out lifecycle
Restrictions
During the cash-out process, it could be declined with the reason of a problem. Such reasons are included within restrictions that occur during cash-out processing (similarly to bet restrictions).
Currently, the following cash-out restriction types are supported:
bet_statusbet_selection_existenceselection_valuesport_event_statussport_event_typesport_event_existencesport_event_bet_stopmarket_statusmarket_existencemarket_defectiveodd_statusodd_existencecash_out_bet_typebet_cash_out_selections_mismatchcash_out_unavailablecash_out_amount_limitcash_out_refund_amountcash_out_order_statuscash_out_order_freebetbet_providerplayer_limit
For more details, please refer to CashOutOrderRestriction schema.
Callback API
Note
You can find the basic implementation of the callback server written in Node.js in our GitHub repository at databet-cloud/callback-server-example.
Important
Please ensure that all callbacks are processed idempotently. Due to our at-least once guarantee, it's possible for a callback to be delivered to the server more than once. Always use the request_id to distinguish and manage each callback appropriately. If a request is duplicated, it is crucial to respond with the same response code and content as the initial response. Consistency in handling and responding to repeated requests ensures seamless operation.
Cash-out callbacks SHOULD be implemented on the integration side only if such functionality is required. A cash-out could be either accepted or declined.
cURL examples
Replace the {callback-api-server} with your callback API server URL and run the following commands to test cash-out callbacks:
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |