Debit player balance for a bet

View as Markdown

Wuzzlo to Operator. Verify the Wuzzlo signature and debit amount atomically. A new debit returns OP_SUCCESS. The same reqId returns OP_DUPLICATE_REQUEST. A new reqId with an existing debit transactionId returns OP_DUPLICATE_TRANSACTION. Insufficient funds returns OP_INSUFFICIENT_FUNDS. All non-success scenarios leave balance unchanged.

Authentication

Signaturestring

Wuzzlo-to-Operator: Base64 RSA-SHA256 PKCS#1 v1.5 signature of the exact UTF-8 JSON body, verified with the Wuzzlo public key.

Request

This endpoint expects an object.
operatorIdstringRequired
sessionTokenstringRequired

Operator session token validated through /auth/login.

userIdstringRequired
reqIdstringRequired

Durable idempotency key. An exact replay must return OP_DUPLICATE_REQUEST without changing balance.

transactionIdstringRequired
Logical wallet transaction identifier shared by the debit lifecycle.
gameIdstringRequired
roundIdstringRequired
amountdoubleRequired

Authoritative monetary amount. Use decimal-safe arithmetic.

tokenstringOptional
debitAmountdoubleOptional
settlementKindstringOptional
settlementStatusstringOptional
resultStatusstringOptional
betTypestringOptional

Response

HTTP 200 debit response. The body status MUST be the single exact value assigned to the matching scenario; statuses are not interchangeable.

balancedouble

Balance returned for this response scenario. Successful mutations return the calculated post-transaction balance; duplicate and rejected scenarios return the unchanged balance.

statusenum
Exact business status required by the matched endpoint scenario. A different status is a contract failure even when the returned balance is correct.