Operator docs Get sandbox access

Reference

Wallet API

The five endpoints your Wallet implements and we call. The OpenAPI document is the source of truth; the Wallet integration guide explains how the money must behave.

Version 1.0.0-draft.1OpenAPI 3.1.2, JSON syntaxSignature tag provider-wallet-api-v1

Base URL

Your Wallet’s HTTPS base URL, which you give us during onboarding, such as https://wallet.casino.example.com or, with a base path, https://api.casino.example.com/provider/lucky8. We append the paths below unchanged, so the Debit of the second example goes to https://api.casino.example.com/provider/lucky8/v1/wallet/debits. Every request is signed as described in Verify our requests.

Headers

We send

HeaderValue
AuthorizationBearer and the Wallet access token you issued to us.
Content-TypeExactly application/json, on POST.
Content-Digestsha-256=:…: of the body, on POST.
Signature-Input, SignatureThe Ed25519 signature, label sig1.
X-Request-IdA new UUID v4 per attempt.
Accept-Encodingidentity.
traceparentOptional W3C trace context. Not signed.

You send

HeaderValue
Content-TypeExactly application/json for 200, application/problem+json otherwise. One value, with no parameters such as charset.
Content-EncodingAbsent, or exactly identity.
Cache-Controlno-store, on every response.
X-Content-Type-Optionsnosniff, on every response.
X-Request-IdA UUID v4, on every response. In a problem body, request_id equals it.
WWW-AuthenticateOn 401: Bearer realm="wallet-api".
Retry-AfterOptional on 429 and 503: seconds, or an HTTP date in IMF-fixdate form.

Get the balance

POST/v1/wallet/balanceobserveWalletBalance

Request fieldTypeDescription
brand_id, game_session_idRequiredUUIDThe Brand and GameSession asking.
player_idRequiredString, 1–256Your External Player ID.
currencyRequiredISO 4217The GameSession’s currency.
operator_session_tokenRequiredString, 1–4096Your Operator Session Token.

200 BalanceResponse, or a problem.

Submit a Debit

POST/v1/wallet/debitssubmitWalletDebit

Body: the command fields with operation: "debit", reason: "gameplay", amount.minor_units of at least 1, no original_transaction_id, and a required operator_session_token.

200 Receipt for both success and rejection, or a problem.

Submit a Credit

POST/v1/wallet/creditssubmitWalletCredit

Body: the command fields with operation: "credit" and no original_transaction_id. reason is gameplay or round_close. An amount of 0 requires reason: "round_close", and round_close requires round_closed: true. operator_session_token is optional.

200 Receipt, or a problem.

Submit a Reversal

POST/v1/wallet/reversalssubmitWalletReversal

Body: the command fields with operation: "reversal", reason: "compensation", an amount of at least 1 and a required original_transaction_id that differs from transaction_id. Player, Brand, Game, GameSession, Round, amount, currency and round_closed equal the original Debit’s. operator_session_token is optional.

200 Receipt, with reversal_effect on success, or a problem.

Get a transaction’s status

GET/v1/wallet/transactions/{transaction_id}getWalletTransactionStatus

No body. transaction_id is the UUID of a Debit, Credit or Reversal we sent.

200 LookupResponse, 404 problem with code: "not_found" when you have no record, or another problem.

Schemas

Command fields

FieldTypeDescription
transaction_idRequiredUUIDOur WalletTransaction ID; your deduplication key.
operationRequireddebit | credit | reversalMatches the endpoint.
brand_id, game_session_id, game_idRequiredUUIDThe context of the money.
player_idRequiredString, 1–256Your External Player ID.
round_idRequiredUUIDThe Round.
amountRequiredMoneyThe exact amount.
reasonRequiredgameplay | round_close | compensationThe purpose of the command.
round_closedRequiredBooleanMust be true on a Credit with reason: "round_close", and on a Reversal it equals the original Debit’s; otherwise either value is valid. Today we send true only on the zero Credit. A winning Credit settles its Round with false; see Credits.
occurred_atRequiredUTC timeThe business time: YYYY-MM-DDTHH:MM:SS[.ffffff]Z, no trailing fractional zeros.
original_transaction_idReversalsUUIDThe Debit being reversed.
operator_session_tokenString, 1–4096Required on Debits. Not part of the identity.

UUIDs are lowercase version 4. Request bodies contain no other fields.

Money

FieldTypeDescription
currencyRequiredISO 4217Three uppercase letters.
minor_unitsRequiredInteger, 0 to 263−1A JSON integer. Never convert it through a floating-point number.

Receipt

FieldTypeDescription
identityRequiredObjectEvery command field except operator_session_token, with the same values.
outcomeRequiredsucceeded | rejectedThe business decision.
rejection_codeStringRequired when rejected; absent otherwise. See rejection codes.
first_reversal_idUUIDOnly with original_already_reversed: the Reversal that canceled the Debit first.
reversal_effectrefunded | prevented | no_effectRequired on a succeeded Reversal; absent otherwise.
processed_atRequiredUTC timeWhen you processed the command.
balance_afterMoneyThe balance right after the command, in its currency. Recommended.

Optional fields are absent, never null. You may add fields; we ignore them.

BalanceResponse

FieldTypeDescription
identityRequiredObjectbrand_id, game_session_id, player_id and currency of the request.
balanceRequiredMoneyThe current balance.
observed_atRequiredUTC timeWhen you read it.

LookupResponse

FieldTypeDescription
statusRequiredreceipt | pendingProcessed, or recorded and still in progress.
transaction_idRequiredUUIDThe ID asked for.
receiptReceiptRequired with receipt, absent with pending: the original receipt.

Problem responses

An RFC 9457 problem in application/problem+json, with fixed, safe texts that never echo request values:

{
  "type": "https://wallet.casino.example.com/problems/transaction_conflict",
  "title": "Transaction conflict",
  "status": 409,
  "detail": "The transaction ID is already bound to a different command.",
  "code": "transaction_conflict",
  "request_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "retryable": false
}
FieldTypeDescription
typeRequiredURIA stable problem type on your documentation origin, by convention …/problems/{code}.
title, detailRequiredStringHuman-readable texts.
statusRequiredIntegerThe HTTP status.
codeRequiredStringOne of the problem codes.
request_idRequiredUUIDEquals your X-Request-Id header.
retryableRequiredBooleanYour advice on retrying. It never tells us whether money moved.
instanceURI referenceOptional reference to the occurrence.