Skip to content

Cashout

POST /api/s2s/cashout converts a won inventory item back into wallet credit. LootBox Solutions calls your wallet.credit for the item’s cashback value, then flips the item to cashed_back.

“Cashout” here means item cashback — turning a prize the player won into balance. It is not a withdrawal of the player’s wallet to a payment method; that stays entirely on your side.

Request

POST https://{operator}.app.lootboxsolutions.com/api/s2s/cashout
{
"playerExternalId": "u_8431",
"inventoryItemId": 88,
"currency": "USD",
"idempotencyKey": "cashback:inventory:88"
}
FieldRequiredNotes
playerExternalIdMust own the item.
inventoryItemIdThe item to cash back. Must be unresolved.
currencyISO 4217 of the player’s wallet. The item’s value is converted into it before the wallet.credit, so the credit lands in the currency your wallet holds. Omit for a single-currency player — the credit goes out in your operator currency unconverted.
idempotencyKeyDefaults to cashback:inventory:<id>. Reuse on retry.

You own the wallet, so you name the currency the credit must arrive in. LootBox Solutions holds the item’s value in your operator currency and converts it into currency at the current rate; the wallet.credit and the response both carry that converted amount, and the operator-currency amount travels in the credit’s reference for your reconciliation.

Response — 200

{
"item": { "inventoryItemId": 88, "state": "cashed_back", "cashbackMinor": 320, "currency": "EUR" },
"balanceAfterMinor": 11820
}

If your wallet refuses or is unreachable, the item is left untouched (unresolved) and the casino’s error code is returned verbatim — the player can retry.

When cashback is available

Only an unresolved item can be cashed back. Once an item is shipped, already cashed back, expired, or otherwise resolved, cashback is unavailable. See the inventory lifecycle.

Errors

codeHTTPwhen
INVENTORY_ITEM_NOT_FOUND404item not found or not owned by the player
CASHBACK_NOT_AVAILABLE422item not unresolved, cashback disabled, no rule, or the requested currency has no configured rate
WALLET_UNAVAILABLE503wallet credit failed

The game app drives the equivalent player-API cashback. This S2S endpoint is the backend-driven equivalent.