credit — Deposit
Adds an amount to the player's balance on round settlement or when the player leaves a seat. The platform retries credits until it receives OK, so the operator must apply a given tx_id only once and must end every case with OK.
POST {wallet_base_url}/creditWhen It Is Called
reason | When | round_id | amount |
|---|---|---|---|
settle | Round settlement in bet-flow games (Baccarat, Blackjack, Speed Hold'em) | rnd_… | Total payout including the returned stake. 0 on a loss |
cash_out | When the player leaves the seat in a buy-in-flow game (leaving, disconnection cleanup, table closure, force logout), plus the refunds below | tss_… | All remaining chips. May be 0 if everything was lost |
settlearrives exactly once for each player with a confirmed bet in that round. It is sent withamount: 0even when there are no winnings, so this credit tells you that the player's round has ended. It is not sent to a player who cancelled all of their bets. If the round is voided, a rollback (round_void) is sent instead of a credit.cash_outis normally sent once per table session (tss_…), but in the following cases additionalcash_outcredits with differenttx_ids may arrive for the same table session.- A buy-in or top-up debit succeeded, but the player left the seat before its result arrived — that amount is returned
- A Live Hold'em hand was voided, but the player's seat had already been cleared — the chips put into that hand are returned
Do not assume one credit per table session; detect duplicates by
tx_idonly.Rake (commission) has already been deducted from the credit. No separate wallet transaction is created for it.
New
reasonvalues may be added. If you receive an unknown value, process it as a deposit.
Request
Headers are the same as the common headers.
| Field | Type | Required | Description |
|---|---|---|---|
tx_id | string | ● | Platform transaction ID. Idempotency key |
external_id | string | ● | Operator-side player ID |
player_id | string | ● | Platform player ID (pl_…), for reference |
currency | string | ● | Currency code |
amount | integer | ● | Payout amount, integer in the minor unit, 0 or more |
reason | string | ● | settle or cash_out |
game_code | string | ● | Game code |
table_id | string | ● | Table ID (tbl_…) |
round_id | string | ● | Round ID (rnd_…) or table session ID (tss_…) |
round_closed | boolean | ● | Whether this credit ends the player's round (table session). Currently true for every credit |
operator_session_id | string | null | ● | The value sent at game launch. null if none was sent or on a platform recovery path |
created_at | string | ● | Time the platform created the transaction (UTC, milliseconds). Does not change on retries |
{
"amount": 30000,
"created_at": "2026-10-19T02:10:41.004Z",
"currency": "PHP",
"external_id": "u-102938",
"game_code": "live_baccarat",
"operator_session_id": "s-88af21",
"player_id": "pl_0199e8b4f2a37c1d8e5b6a4f3c2d1e0b",
"reason": "settle",
"round_closed": true,
"round_id": "rnd_0199f2a0b1c27d3e8f4a5b6c7d8e9f01",
"table_id": "tbl_0199a1b2c3d47e5f8a9b0c1d2e3f4a5b",
"tx_id": "tx_8e2b4d6f1a3c5e7b9d0f2a4c6e8b1d3f"
}{
"amount": 182000,
"created_at": "2026-10-19T03:05:17.880Z",
"currency": "PHP",
"external_id": "u-102938",
"game_code": "holdem_nlh",
"operator_session_id": "s-88af21",
"player_id": "pl_0199e8b4f2a37c1d8e5b6a4f3c2d1e0b",
"reason": "cash_out",
"round_closed": true,
"round_id": "tss_0199f29e7c6b4a5d8e3f2a1b0c9d8e7f",
"table_id": "tbl_0199a1b5d0e47f2a9b8c7d6e5f4a3b2c",
"tx_id": "tx_c4e6a8b0d2f41a3c5e7b9d1f3a5c7e9b"
}{
"amount": 0,
"created_at": "2026-10-19T02:11:39.412Z",
"currency": "PHP",
"external_id": "u-102938",
"game_code": "live_baccarat",
"operator_session_id": "s-88af21",
"player_id": "pl_0199e8b4f2a37c1d8e5b6a4f3c2d1e0b",
"reason": "settle",
"round_closed": true,
"round_id": "rnd_0199f2a3e5c17a9b8d6f4e2c0a1b3d5f",
"table_id": "tbl_0199a1b2c3d47e5f8a9b0c1d2e3f4a5b",
"tx_id": "tx_1f3d5b7a9c0e2f4a6b8d0c2e4f6a8b0d"
}Response
| Field | Type | Required | Description |
|---|---|---|---|
status | string | ● | Must be OK for the transaction to finish |
balance | integer | ● | Balance after the deposit. The current balance if amount: 0 |
operator_tx_id | string | Operator-side transaction ID |
{ "status": "OK", "balance": 1275000, "operator_tx_id": "w-99813" }Platform Behavior
| Result | Platform handling |
|---|---|
OK | Confirmed. The response balance is shown on the player's screen |
Any status other than OK (including PLAYER_NOT_FOUND, PLAYER_BLOCKED, INVALID_REQUEST, INVALID_SIGNATURE) | Retried |
| 5-second timeout, non-HTTP-200, connection failure, invalid JSON | Retried |
The retry intervals are 1 s → 2 s → 5 s → 15 s → 1 min → 5 min, then every 5 minutes indefinitely. The retry body is byte-for-byte identical to the original (including created_at). Only the signature headers are regenerated.
Credits cannot be rejected
If you return anything other than OK for a credit, the transaction does not finish and keeps being retried. Even in the following cases, apply it and return OK.
- The player is blocked or self-excluded, or has logged out or has an expired session — this is a transaction that returns money.
operator_session_idisnullor refers to a session that has already ended — do not validate against the session value.amountis0— do not change the balance; returnOKwith the current balance.- The same
tx_idarrives again — do not add it again; returnOKwith the original response as is.
Processing Order
- Verify the signature → on failure,
INVALID_SIGNATURE(it will be retried, so fix the cause right away) - Validate fields (
tx_idandexternal_idpresent,amountis an integer of 0 or more) → on failure,INVALID_REQUEST - If a record for the same
tx_idexists → return the stored response as is - Lock the player row
- Add
amount(unchanged if 0) and returnOK+ the post-depositbalance+operator_tx_id - Record the
tx_idtogether with the response
Credits cannot be cancelled (rolled back). If you suspect an incorrect payout, resolve it with the platform through the operational procedure.
Notes
- Ordering: A credit being retried may arrive later than a debit for the same player created after it. Do not rely on arrival order.
- Do not delete players: If the operator deletes a player account and
PLAYER_NOT_FOUNDresults, that player's pending credits will never finish. Keep the account record so that wallet callbacks can still be received after the player closes their account. - Reconciliation: The platform-side transaction status can be viewed with
GET /transactions. Credits being retried appear asstatus: "uncertain"(orpending).