Skip to content

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.

http
POST {wallet_base_url}/credit

When It Is Called ​

reasonWhenround_idamount
settleRound settlement in bet-flow games (Baccarat, Blackjack, Speed Hold'em)rnd_…Total payout including the returned stake. 0 on a loss
cash_outWhen the player leaves the seat in a buy-in-flow game (leaving, disconnection cleanup, table closure, force logout), plus the refunds belowtss_…All remaining chips. May be 0 if everything was lost
  • settle arrives exactly once for each player with a confirmed bet in that round. It is sent with amount: 0 even 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_out is normally sent once per table session (tss_…), but in the following cases additional cash_out credits with different tx_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_id only.

  • Rake (commission) has already been deducted from the credit. No separate wallet transaction is created for it.

  • New reason values may be added. If you receive an unknown value, process it as a deposit.

Request ​

Headers are the same as the common headers.

FieldTypeRequiredDescription
tx_idstring●Platform transaction ID. Idempotency key
external_idstring●Operator-side player ID
player_idstring●Platform player ID (pl_…), for reference
currencystring●Currency code
amountinteger●Payout amount, integer in the minor unit, 0 or more
reasonstring●settle or cash_out
game_codestring●Game code
table_idstring●Table ID (tbl_…)
round_idstring●Round ID (rnd_…) or table session ID (tss_…)
round_closedboolean●Whether this credit ends the player's round (table session). Currently true for every credit
operator_session_idstring | null●The value sent at game launch. null if none was sent or on a platform recovery path
created_atstring●Time the platform created the transaction (UTC, milliseconds). Does not change on retries
json
{
  "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"
}
json
{
  "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"
}
json
{
  "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 ​

FieldTypeRequiredDescription
statusstring●Must be OK for the transaction to finish
balanceinteger●Balance after the deposit. The current balance if amount: 0
operator_tx_idstringOperator-side transaction ID
json
{ "status": "OK", "balance": 1275000, "operator_tx_id": "w-99813" }

Platform Behavior ​

ResultPlatform handling
OKConfirmed. 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 JSONRetried

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_id is null or refers to a session that has already ended — do not validate against the session value.
  • amount is 0 — do not change the balance; return OK with the current balance.
  • The same tx_id arrives again — do not add it again; return OK with the original response as is.

Processing Order ​

  1. Verify the signature → on failure, INVALID_SIGNATURE (it will be retried, so fix the cause right away)
  2. Validate fields (tx_id and external_id present, amount is an integer of 0 or more) → on failure, INVALID_REQUEST
  3. If a record for the same tx_id exists → return the stored response as is
  4. Lock the player row
  5. Add amount (unchanged if 0) and return OK + the post-deposit balance + operator_tx_id
  6. Record the tx_id together 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_FOUND results, 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 as status: "uncertain" (or pending).

Docs v1.0.0 · Operator API v1