Appearance
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_adjusttype | direction | original_transaction_ref |
|---|---|---|
bet | debit | — |
win | credit | — |
cashout | credit | — |
cashout_partial | credit | — |
refund | credit | the bet |
win_reversal | debit | the win |
uncancel | debit | the refund |
resettle_adjust | debit | 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
| Field | Type | Sent on |
|---|---|---|
version | "2" | all |
type | string | all |
direction | debit | credit | all |
transaction_ref | string | all |
original_transaction_ref | string | reversals |
operator_id | string | all |
ticket_id | string | all |
user_id | string | all |
amount | decimal string, positive | all |
currency | ISO 4217 | all |
stake | decimal string | bet |
potential_win | decimal string | bet |
win_amount | decimal string | win, cashout* |
bet_type | single | combi | system | betbuilder | all |
system | "k/n" | system bets |
total_odds | decimal string | when known |
is_live | bool | when known |
ticket_status | open | won | lost | void | cashed_out | cancelled | after a settlement |
selections | array | all |
created_at | RFC 3339 | bet |
settled_at | RFC 3339 | win, cashout* |
selections[]
| Field | Type |
|---|---|
event_id, sport_id, category_id, tournament_id | string |
market_id, market_type_id, outcome_id | string |
odds | decimal string |
is_live | bool (when known) |
event_start | RFC 3339 (when known) |
result | open | won | lost | void | half_won | half_lost (after a settlement) |
Signature headers
| Header | Value |
|---|---|
X-Oddyne-Key-Id | The site key's id |
X-Oddyne-Timestamp | Unix seconds; accept ±300 s |
X-Oddyne-Signature | v1= + 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": "..." }| Answer | Read as |
|---|---|
200 + ok | applied |
200/4xx + error | definite refusal, not resent |
5xx, timeout (5 s), network error, unreadable body | unknown, 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).