Example how to implement outcome selection with your bet slip integration.
The Player Prop Zone widget uses the adapter V2 betSlipSelection endpoint to synchronise bet slip state
and the onAction prop to notify you when a user clicks on an odds button.
Flow
- Register the adapter with a
betSlipSelection endpoint. The widget calls this endpoint and passes a callback you must store.
- Pass an
onAction handler to the widget. When a user taps an odds button the handler receives an event whose data.selections array contains the selected outcomes.
- Check that
event.type equals "AddSelectionsToBetSlip" before processing the selections.
- Update your bet slip state and invoke the stored
callback with the new state so the widget can reflect which selections are active.
onAction event
The onAction callback receives an event object with the following structure:
{
type: "AddSelectionsToBetSlip",
data: {
selections: [
{
type: "uf",
event: string,
market: string,
specifiers?: string,
outcome: string,
odds?: {
type: "eu" | "uk" | "us" | "hong-kong" | "indonesian" | "malay",
value: string
}
}
]
}
}
type – The action type. For bet slip integration the value is always "AddSelectionsToBetSlip".
data.selections – An array of selection objects with the following properties:
type – Always "uf".
event – The UOF event identifier (e.g. "sr:match:61301097").
market – The UOF market identifier.
specifiers – Optional. Additional market specifier (e.g. a line value such as "total=1.5").
outcome – The UOF outcome identifier.
odds – Optional. Contains type (odds format) and value (odds value as string).