spin() runs an immediate spin for a user and returns the full result.
Usage
Parameters
string
required
User identifier from your system. Example:
user-123.string
required
Campaign ID. Example:
camp-abc.string
default:"generated by the SDK"
Key used to avoid duplicate spins during retries. Example:
checkout-789.Response
string
Unique spin ID.
string
Spin outcome. Common values:
won_points, lost, won_digital, won_physical.object
Prize selected by the spin.
string
Prize ID.
string
Display name of the prize.
number | null
Points awarded when
outcome is won_points.object
Data for rendering a deterministic animation.
number
Seed used to reproduce the animation.
number
Recommended animation duration in milliseconds.
number
Recommended target angle for the roulette.
number
Remaining prize stock.
-1 means unlimited inventory.object | null
Prize reservation when the result requires
claim().boolean
Whether you must call
claim() to complete delivery.
