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.
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
| Header | Value |
|---|---|
Authorization | Bearer and the Wallet access token you issued to us. |
Content-Type | Exactly application/json, on POST. |
Content-Digest | sha-256=:…: of the body, on POST. |
Signature-Input, Signature | The Ed25519 signature, label sig1. |
X-Request-Id | A new UUID v4 per attempt. |
Accept-Encoding | identity. |
traceparent | Optional W3C trace context. Not signed. |
You send
| Header | Value |
|---|---|
Content-Type | Exactly application/json for 200, application/problem+json otherwise. One value, with no parameters such as charset. |
Content-Encoding | Absent, or exactly identity. |
Cache-Control | no-store, on every response. |
X-Content-Type-Options | nosniff, on every response. |
X-Request-Id | A UUID v4, on every response. In a problem body, request_id equals it. |
WWW-Authenticate | On 401: Bearer realm="wallet-api". |
Retry-After | Optional on 429 and 503: seconds, or an HTTP date in IMF-fixdate form. |
Get the balance
POST/v1/wallet/balanceobserveWalletBalance
| Request field | Type | Description |
|---|---|---|
brand_id, game_session_idRequired | UUID | The Brand and GameSession asking. |
player_idRequired | String, 1–256 | Your External Player ID. |
currencyRequired | ISO 4217 | The GameSession’s currency. |
operator_session_tokenRequired | String, 1–4096 | Your 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.
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
| Field | Type | Description |
|---|---|---|
transaction_idRequired | UUID | Our WalletTransaction ID; your deduplication key. |
operationRequired | debit | credit | reversal | Matches the endpoint. |
brand_id, game_session_id, game_idRequired | UUID | The context of the money. |
player_idRequired | String, 1–256 | Your External Player ID. |
round_idRequired | UUID | The Round. |
amountRequired | Money | The exact amount. |
reasonRequired | gameplay | round_close | compensation | The purpose of the command. |
round_closedRequired | Boolean | Must 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_atRequired | UTC time | The business time: YYYY-MM-DDTHH:MM:SS[.ffffff]Z, no trailing fractional zeros. |
original_transaction_idReversals | UUID | The Debit being reversed. |
operator_session_token | String, 1–4096 | Required on Debits. Not part of the identity. |
UUIDs are lowercase version 4. Request bodies contain no other fields.
Money
| Field | Type | Description |
|---|---|---|
currencyRequired | ISO 4217 | Three uppercase letters. |
minor_unitsRequired | Integer, 0 to 263−1 | A JSON integer. Never convert it through a floating-point number. |
Receipt
| Field | Type | Description |
|---|---|---|
identityRequired | Object | Every command field except operator_session_token, with the same values. |
outcomeRequired | succeeded | rejected | The business decision. |
rejection_code | String | Required when rejected; absent otherwise. See rejection codes. |
first_reversal_id | UUID | Only with original_already_reversed: the Reversal that canceled the Debit first. |
reversal_effect | refunded | prevented | no_effect | Required on a succeeded Reversal; absent otherwise. |
processed_atRequired | UTC time | When you processed the command. |
balance_after | Money | The balance right after the command, in its currency. Recommended. |
Optional fields are absent, never null. You may add fields; we ignore them.
BalanceResponse
| Field | Type | Description |
|---|---|---|
identityRequired | Object | brand_id, game_session_id, player_id and currency of the request. |
balanceRequired | Money | The current balance. |
observed_atRequired | UTC time | When you read it. |
LookupResponse
| Field | Type | Description |
|---|---|---|
statusRequired | receipt | pending | Processed, or recorded and still in progress. |
transaction_idRequired | UUID | The ID asked for. |
receipt | Receipt | Required 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
}
| Field | Type | Description |
|---|---|---|
typeRequired | URI | A stable problem type on your documentation origin, by convention …/problems/{code}. |
title, detailRequired | String | Human-readable texts. |
statusRequired | Integer | The HTTP status. |
codeRequired | String | One of the problem codes. |
request_idRequired | UUID | Equals your X-Request-Id header. |
retryableRequired | Boolean | Your advice on retrying. It never tells us whether money moved. |
instance | URI reference | Optional reference to the occurrence. |