Skip to content

Wallet Callbacks ​

Contract version 2. The seamless-wallet callbacks the operator implements at their wallet base URL; Oddyne calls them to move money on the operator's ledger. The Callbacks guide has the full walkthrough.

Endpoints and types ​

POST <WALLET_URL>/bet        # bet
POST <WALLET_URL>/win        # win, cashout, cashout_partial
POST <WALLET_URL>/rollback   # refund, win_reversal, uncancel, resettle_adjust
typedirectionoriginal_transaction_ref
betdebit—
wincredit—
cashoutcredit—
cashout_partialcredit—
refundcreditthe bet
win_reversaldebitthe win
uncanceldebitthe refund
resettle_adjustdebit | credit—

A correction of a settled ticket is one resettle_adjust per money movement (resettle:<ticket>:<n>, n increasing, may skip): a debit of what it paid when it is reopened, a credit of its payout when it settles again. Paid = win + Σ credits − Σ debits = what the current ticket_status pays.

Branch on type. Fields are snake_case; money is a decimal string at the currency's scale; ids are strings.

Idempotency ​

transaction_ref is unique per money event. A repeat returns the same result and moves nothing. Calls are resent until answered — expect duplicates.

Request fields ​

FieldTypeSent on
version"2"all
typestringall
directiondebit | creditall
transaction_refstringall
original_transaction_refstringreversals
operator_idstringall
ticket_idstringall
user_idstringall
amountdecimal string, positiveall
currencyISO 4217all
stakedecimal stringbet
potential_windecimal stringbet
win_amountdecimal stringwin, cashout*
bet_typesingle | combi | system | betbuilderall
system"k/n"system bets
total_oddsdecimal stringwhen known
is_liveboolwhen known
ticket_statusopen | won | lost | void | cashed_out | cancelledafter a settlement
selectionsarrayall
created_atRFC 3339bet
settled_atRFC 3339win, cashout*

selections[] ​

FieldType
event_id, sport_id, category_id, tournament_idstring
market_id, market_type_id, outcome_idstring
oddsdecimal string
is_livebool (when known)
event_startRFC 3339 (when known)
resultopen | won | lost | void | half_won | half_lost (after a settlement)

Signature headers ​

HeaderValue
X-Oddyne-Key-IdThe site key's id
X-Oddyne-TimestampUnix seconds; accept ±300 s
X-Oddyne-Signaturev1= + base64 Ed25519 signature

Signed string: v1\n<timestamp>\n<METHOD>\n<path?query>\n<hex sha256(raw body)>.

Response ​

json
{ "status": "ok", "transaction_id": "operator-side-tx-id" }
json
{ "status": "error", "error_code": "INSUFFICIENT_FUNDS", "error_message": "..." }
AnswerRead as
200 + okapplied
200/4xx + errordefinite refusal, not resent
5xx, timeout (5 s), network error, unreadable bodyunknown, resent (credits until answered; bet for 2 minutes, then refunded as betrefund:<ticket>)

error_code on a refused bet: INSUFFICIENT_FUNDS, PLAYER_BLOCKED, LIMIT_EXCEEDED, CURRENCY_MISMATCH, INVALID_SIGNATURE (HTTP 401), or any other code (shown to the player as a generic refusal).

Integration documentation for the Oddyne Sportsbook.