{"openapi":"3.1.0","info":{"title":"Repackz.fun Game Platform API","version":"1.0.2","summary":"Seamless-wallet API for integrating Repackz.fun loot-packs as a game provider.","description":"Operator-facing REST API + webhook contract for integrating Repackz.fun\nas a seamless-wallet provider.\n\n## Overview\n\n- **You** (the game platform) hold the player's real money.\n- **We** expose loot-pack games via an embeddable iframe.\n- When the player buys a pack in our iframe, we call your `debit` webhook.\n- When the player sells an item, we call your `credit` webhook.\n- On any failure mid-flow, we call your `refund` webhook.\n\n## Authentication\n\nAll operator-facing endpoints require an `Authorization: Bearer <api_key>`\nheader **plus** an HMAC signature (see below). The `api_key` is issued\nwhen your operator is registered in our admin panel; it's paired with an\n`api_secret` used both to  **sign** your inbound requests to us and to\n**verify** our outbound webhook signatures. The same `api_secret` covers\nboth directions, so a single sign/verify helper on your side is enough.\n\n## Request signature\n\nEvery request crossing the integration boundary — both our outbound\nwebhooks (`debit` / `credit` / `refund` / `get_session` / `get_balance`)\nand your inbound calls to our operator-facing endpoints (`POST /sessions`,\netc.) — carries two headers:\n\n- `X-Repackz-Timestamp: <unix-seconds>`\n- `X-Repackz-Signature: sha256=<hex>`\n\nwhere `signature = HMAC-SHA256(api_secret,\"<timestamp>.<METHOD> <fullpath>.<raw_body>\")`.\n\n- `<METHOD>` — uppercase HTTP method (e.g. `POST`).\n- `<fullpath>` — request URI (path + query, no host), e.g. `/loot_machine/api/game_platform/v1/sessions` or `/your/webhook/path`.\n- `<raw_body>` — exact request body bytes (empty string for requests without a body).\n\nReject requests with a timestamp older than 5 minutes (replay protection)\nand compare signatures constant-time.\n\n## Idempotency\n\nEvery transaction carries a deterministic `transaction_id`:\n- Purchase debit: `dbt_<pool_order_id>`\n- Sell credit: `crd_<pool_item_id>` (same id whether triggered by a player or by the auto-sell timer)\n- Refund: `rfd_<pool_order_id>`\n\nRetries are safe to send with the same `transaction_id`. Respond with\n`{status: 1, error_code: \"DUPLICATE_TRANSACTION_ID\"}` if you've already\nprocessed it — we treat that as success.\n\n## Amounts\n\nAll amounts are expressed in **minor units** (cents for USD) as integers.\nCurrency is 3-letter ISO-4217 (e.g., `\"USD\"`).\n","license":{"name":"Proprietary","url":"https://getcardbase.com/terms"}},"servers":[{"url":"https://api.getcardbase.com/loot_machine/api/game_platform/v1","description":"Production"},{"url":"https://staging-api.getcardbase.com/loot_machine/api/game_platform/v1","description":"Staging / sandbox"}],"tags":[{"name":"Sessions","description":"Launch and invalidate player sessions.","x-scalar-order":["repackzfun-game-platform-api-100/tag/sessions/POST/sessions","repackzfun-game-platform-api-100/tag/sessions/DELETE/sessions/{token}"]},{"name":"Games","description":"Catalog of available games.","x-scalar-order":["repackzfun-game-platform-api-100/tag/games/GET/games"]},{"name":"Transactions","description":"Ledger of all debit/credit/refund transactions.","x-scalar-order":["repackzfun-game-platform-api-100/tag/transactions/GET/history","repackzfun-game-platform-api-100/tag/transactions/GET/unfinished_transactions"]},{"name":"Rounds","description":"Full detail of a single round (purchase + reveal + optional sell/refund).","x-scalar-order":["repackzfun-game-platform-api-100/tag/rounds/GET/rounds/{round_id}"]},{"name":"Players","description":"Player-centric aggregates for your UI.","x-scalar-order":["repackzfun-game-platform-api-100/tag/players/GET/players/{account_id}/summary","repackzfun-game-platform-api-100/tag/players/GET/players/{account_id}/status","repackzfun-game-platform-api-100/tag/players/GET/players/{account_id}/inventory"]},{"name":"Webhooks","description":"Endpoints YOU (the operator) must implement for us to call.","x-scalar-order":["repackzfun-game-platform-api-100/tag/webhooks/webhook/POST/get-session","repackzfun-game-platform-api-100/tag/webhooks/webhook/POST/get-balance","repackzfun-game-platform-api-100/tag/webhooks/webhook/POST/debit","repackzfun-game-platform-api-100/tag/webhooks/webhook/POST/credit","repackzfun-game-platform-api-100/tag/webhooks/webhook/POST/refund"]}],"security":[{"BearerAuth":[]}],"paths":{"/sessions":{"post":{"tags":["Sessions"],"summary":"Create a new player session","description":"Called by your server when a player launches one of our games. Returns a\n`launch_url` you redirect the player's browser to, plus a `session_token`\nused implicitly by the iframe.\n\nThis endpoint is **idempotent per (operator, player-token)** — calling it\ntwice with the same operator-issued `token` returns the same `launch_url`\nwithout creating a duplicate session. A different `token` for the same\nplayer invalidates the old session and creates a fresh one.\n","operationId":"createSession","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreateRequest"}}}},"responses":{"200":{"description":"Session created or reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreateResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Validation error. Possible codes: `INVALID_TEMPLATE` (`template` is not a known template name), `OPERATOR_AUTHENTICATION_FAIL` (the `get_session` webhook rejected the supplied `token`), `OPERATOR_INVALID_RESPONSE` (`get_session` returned a blank `account_id`), `SESSION_CREATE_FAILED` (persistence error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"callbacks":{"getSession":{"{$request.body#/callback_base_url}/get_session":{"post":{"summary":"(Your webhook) Resolve player identity from token","description":"We call this immediately after receiving your `POST /sessions` request,\npassing the `token` you supplied. You return the player's identity —\nthis becomes the link between your player and our user.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSessionWebhookRequest"}}}},"responses":{"200":{"description":"Player resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSessionWebhookResponse"}}}}}}}}}}},"/sessions/{token}":{"delete":{"tags":["Sessions"],"summary":"Invalidate a player session","description":"Call on logout, self-exclusion, or KYC block. Idempotent — deleting an\nalready-invalidated session still returns 204.\n","operationId":"deleteSession","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"},"description":"The `session_token` from `POST /sessions`."}],"responses":{"204":{"description":"Session invalidated"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/games":{"get":{"tags":["Games"],"summary":"List available games","description":"Catalog of packs available to the player. Use to build your game-selection UI.\n","operationId":"listGames","responses":{"200":{"description":"List of games","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/history":{"get":{"tags":["Transactions"],"summary":"List transactions for reconciliation","description":"Paginated list of every debit/credit/refund recorded for your operator.\nUse for periodic reconciliation with your own ledger. Max window 30 days.\n","operationId":"listHistory","parameters":[{"in":"query","name":"start_date","schema":{"type":"string","format":"date-time"},"description":"ISO-8601 start","inclusive":null},{"in":"query","name":"end_date","schema":{"type":"string","format":"date-time"},"description":"ISO-8601 end","exclusive":null},{"in":"query","name":"round_id","schema":{"type":"string"},"description":"Optional — filter to a single round"},{"in":"query","name":"account_id","schema":{"type":"string"},"description":"Optional — filter to a single player"},{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"per","schema":{"type":"integer","default":20,"maximum":200}}],"responses":{"200":{"description":"Paginated transactions","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"INVALID_TIME_INTERVAL — window > 30 days","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/unfinished_transactions":{"get":{"tags":["Transactions"],"summary":"List transactions in limbo states","description":"Returns transactions that are **pending** or **failed credit/refund** —\nstates where we might owe the player money. Use for support investigations\nand operational monitoring.\n\n`start_date` and `end_date` are **required**. Max window 30 days.\n","operationId":"listUnfinishedTransactions","parameters":[{"in":"query","name":"start_date","required":true,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"end_date","required":true,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"account_id","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"per","schema":{"type":"integer","default":20,"maximum":200}}],"responses":{"200":{"description":"Paginated limbo transactions","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/UnfinishedTransaction"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"INVALID_TIME_INTERVAL — `start_date`/`end_date` missing, unparseable, reversed, or window > 30 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/rounds/{round_id}":{"get":{"tags":["Rounds"],"summary":"Full detail of a round","description":"Returns everything about a single round: transactions, status, revealed items.\nUse when a player disputes a purchase and you need to see the complete picture.\n","operationId":"getRound","parameters":[{"in":"path","name":"round_id","required":true,"schema":{"type":"string"},"example":"rnd_42"}],"responses":{"200":{"description":"Round details","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Round"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/players/{account_id}/summary":{"get":{"tags":["Players"],"summary":"Aggregate money flow for a player","description":"Returns num_purchases, total_spent, total_returned, net for the given\nwindow. Useful for player profile pages and responsible-gaming checks.\nMax window 90 days.\n","operationId":"getPlayerSummary","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"from","required":true,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Player summary","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PlayerSummary"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"INVALID_TIME_INTERVAL — `from`/`to` missing, unparseable, reversed, or window > 90 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/players/{account_id}/status":{"get":{"tags":["Players"],"summary":"Snapshot of a player's current state","description":"Lightweight snapshot used by your self-exclusion / account-close flows\nto know if the player has unsettled state with us.\n","operationId":"getPlayerStatus","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player status","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PlayerStatus"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/players/{account_id}/inventory":{"get":{"tags":["Players"],"summary":"Items currently owned by the player","description":"Paginated list of items the player currently owns in our system\n(excluding items sold back). Useful for a \"Your Repackz.fun\" tab\nin your player profile.\n","operationId":"getPlayerInventory","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"per","schema":{"type":"integer","default":20,"maximum":200}}],"responses":{"200":{"description":"Paginated inventory","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"webhooks":{"get_session":{"post":{"tags":["Webhooks"],"summary":"Resolve player identity from a session token","description":"Called once per `POST /sessions` to map the operator-side `token` to a\nconcrete player record. Response must include `account_id` which\nbecomes the permanent identifier in our system for this player.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSessionWebhookRequest"}}}},"responses":{"200":{"description":"Player resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSessionWebhookResponse"}}}}}}},"get_balance":{"post":{"tags":["Webhooks"],"summary":"Return current player balance","description":"Called by our iframe on demand to show the player's live operator-side\nbalance. Idempotent — must return current balance without any side effects.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBalanceWebhookRequest"}}}},"responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBalanceWebhookResponse"}}}}}}},"debit":{"post":{"tags":["Webhooks"],"summary":"Debit player for a purchase","description":"Called when a player buys a pack. Deduct `amount` (in minor units) from\nthe player's balance. Respond with `status:0` and new `balance` on success.\n\nMust be **idempotent by `transaction_id`**: if you see the same\n`transaction_id` twice, return `{status:1, error_code: \"DUPLICATE_TRANSACTION_ID\"}`\n— we treat that as success without double-debiting.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebitWebhookRequest"}}}},"responses":{"200":{"description":"Debit processed (see body.status)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}}}}},"credit":{"post":{"tags":["Webhooks"],"summary":"Credit player for an item sale","description":"Called when a player sells an item back. Add `amount` to player balance.\nSame idempotency contract as `debit`.\n\n`round_end_state: true` signals the round is closed — do not list it in\nyour \"unfinished games\" reports for this round.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditWebhookRequest"}}}},"responses":{"200":{"description":"Credit processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}}}}},"refund":{"post":{"tags":["Webhooks"],"summary":"Refund a previously-committed debit","description":"Called when a debit succeeded but the downstream reveal failed on our\nside (e.g., items unavailable). You reverse the debit by re-crediting\n`amount` to the player. The `original_transaction_id` points to the\ndebit being refunded.\n\nSame idempotency contract — retry-safe.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundWebhookRequest"}}}},"responses":{"200":{"description":"Refund processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"api_key","description":"Your operator `api_key`, issued at registration."}},"responses":{"Unauthorized":{"description":"Missing or invalid api_key, or IP not in whitelist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Requested resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ValidationError":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","required":["error","error_detail"],"properties":{"error":{"type":"integer","enum":[1]},"error_detail":{"type":"object","required":["id","code","message"],"properties":{"id":{"type":"integer","example":101},"code":{"type":"string","example":"INVALID_TOKEN"},"message":{"type":"string","example":"Invalid or expired session token"}}}}},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","example":1},"total_count":{"type":"integer","example":127}}},"SessionCreateRequest":{"type":"object","required":["token","game_id"],"properties":{"token":{"type":"string","description":"Your internal player-session token","unique per launch":null,"example":"tkn_xyz_9f21..."},"game_id":{"type":"integer","description":"ID from /games","example":42},"platform":{"type":"string","enum":["desktop","mobile"],"description":"Optional"},"language":{"type":"string","description":"ISO-639-1","optional":null,"example":"en"},"lobby_url":{"type":"string","description":"Where to send player on \"Back to platform\"","optional":null},"deposit_url":{"type":"string","description":"Where to send player on \"Deposit\"","optional":null},"template":{"type":"string","description":"Optional UI/branding template snapshot key. Resolved server-side against the operator's templates catalog. When omitted, the operator's `default_template` is used. Unknown values produce `422 INVALID_TEMPLATE`.","example":"default"},"context":{"type":"object","description":"Optional player context block","properties":{"username":{"type":"string"},"country":{"type":"string","description":"ISO-3166-1 alpha-2"},"currency":{"type":"string","description":"ISO-4217"}}}}},"SessionCreateResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"launch_url":{"type":"string","format":"uri","example":"https://game.example.com/?session_token=abc..."},"session_token":{"type":"string","example":"abc123..."},"expires_at":{"type":"string","format":"date-time"}}}}},"Game":{"type":"object","properties":{"game_id":{"type":"string","example":"42"},"game_name":{"type":"string","example":"Starter Pack"},"game_title":{"type":"string","example":"Starter Pack"},"game_type":{"type":"string","example":"loot_pack"},"category":{"type":"string","example":"packs"},"description":{"type":"string"},"price_cents":{"type":"integer","example":500},"currency":{"type":"string","example":"USD"},"in_stock":{"type":"integer","example":1000},"max_quantity":{"type":"integer","example":20},"thumbnail_url":{"type":"string","format":"uri","nullable":true},"metadata":{"type":"object","properties":{"estimated_value":{"type":"number"},"slug":{"type":"string"}}}}},"Transaction":{"type":"object","properties":{"transaction_id":{"type":"string","example":"dbt_42"},"round_id":{"type":"string","example":"rnd_42"},"direction":{"type":"string","enum":["debit","credit","refund"]},"amount_cents":{"type":"integer","example":500},"amount_dollars":{"type":"number","example":5},"status":{"type":"string","enum":["pending","successful","failed"]},"created_at":{"type":"string","format":"date-time"}}},"UnfinishedTransaction":{"allOf":[{"$ref":"#/components/schemas/Transaction"},{"type":"object","properties":{"account_id":{"type":"string","example":"abc"},"updated_at":{"type":"string","format":"date-time"}}}]},"Round":{"type":"object","properties":{"round_id":{"type":"string","example":"rnd_42"},"account_id":{"type":"string"},"game_id":{"type":"string","nullable":true},"game_name":{"type":"string","nullable":true},"game_type":{"type":"string","example":"loot_pack"},"status":{"type":"string","enum":["pending","revealed","failed","refunded","unknown"]},"opened_at":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"type":"object","properties":{"transaction_id":{"type":"string"},"direction":{"type":"string","enum":["debit","credit","refund"]},"amount_cents":{"type":"integer"},"status":{"type":"string","enum":["pending","successful","failed"]},"created_at":{"type":"string","format":"date-time"}}}},"items_revealed":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}}}},"PlayerSummary":{"type":"object","properties":{"account_id":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"num_purchases":{"type":"integer"},"total_spent_cents":{"type":"integer"},"total_returned_cents":{"type":"integer"},"net_cents":{"type":"integer","description":"spent − returned; positive = player net-lost"},"currency":{"type":"string"}}},"PlayerStatus":{"type":"object","properties":{"account_id":{"type":"string"},"has_pending_orders":{"type":"boolean"},"inventory_value_cents":{"type":"integer"},"last_activity_at":{"type":"string","format":"date-time","nullable":true}}},"InventoryItem":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"rarity":{"type":"string","nullable":true},"image_url":{"type":"string","format":"uri","nullable":true},"fair_market_value":{"type":"number"},"buy_back_value":{"type":"number","nullable":true},"engagement_status":{"type":"string","enum":["reserved","on_hands","listed"]}}},"SignedWebhookHeaders":{"type":"object","description":"Every outbound webhook we send carries these two headers.\n","properties":{"X-Repackz-Timestamp":{"type":"string","example":"1745256000"},"X-Repackz-Signature":{"type":"string","example":"sha256=abc123..."}}},"GetSessionWebhookRequest":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"The token you supplied to POST /sessions"}}},"GetSessionWebhookResponse":{"type":"object","required":["status","account_id"],"properties":{"status":{"type":"integer","enum":[0,1],"description":"0 = success","1 = error":null},"account_id":{"type":"string","description":"Your permanent identifier for the player"},"username":{"type":"string"},"country":{"type":"string","description":"ISO-3166-1"},"currency":{"type":"string","description":"ISO-4217"},"balance":{"type":"integer","description":"Current balance in minor units"}}},"GetBalanceWebhookRequest":{"type":"object","required":["token","account_id"],"properties":{"token":{"type":"string"},"account_id":{"type":"string"}}},"GetBalanceWebhookResponse":{"type":"object","required":["status","balance","currency"],"properties":{"status":{"type":"integer","enum":[0,1]},"balance":{"type":"integer"},"currency":{"type":"string"}}},"DebitWebhookRequest":{"type":"object","required":["token","account_id","amount","currency","transaction_id","round_id","game_id","game_name","game_type","note"],"properties":{"token":{"type":"string"},"account_id":{"type":"string"},"amount":{"type":"integer","description":"Amount to debit in minor units (cents)"},"currency":{"type":"string","example":"USD"},"transaction_id":{"type":"string","example":"dbt_42","description":"Deterministic; identical across retries"},"round_id":{"type":"string","example":"rnd_42"},"game_id":{"type":"string","example":"42"},"game_name":{"type":"string","example":"Starter Pack"},"game_type":{"type":"string","example":"loot_pack"},"note":{"type":"string","example":"debit"}}},"CreditWebhookRequest":{"type":"object","required":["token","account_id","amount","currency","transaction_id","round_id","round_end_state"],"properties":{"token":{"type":"string"},"account_id":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"transaction_id":{"type":"string","example":"crd_1001"},"round_id":{"type":"string","example":"rnd_42"},"game_id":{"type":"string","nullable":true},"game_name":{"type":"string","nullable":true},"game_type":{"type":"string","example":"loot_pack"},"round_end_state":{"type":"boolean","enum":[true],"description":"Always true — our rounds are atomic"},"note":{"type":"string","example":"credit"}}},"RefundWebhookRequest":{"type":"object","required":["token","account_id","amount","currency","transaction_id","original_transaction_id","round_id"],"properties":{"token":{"type":"string"},"account_id":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"transaction_id":{"type":"string","example":"rfd_42"},"original_transaction_id":{"type":"string","example":"dbt_42","description":"The debit being refunded"},"round_id":{"type":"string"},"game_id":{"type":"string","nullable":true},"game_name":{"type":"string","nullable":true},"game_type":{"type":"string","example":"loot_pack"},"note":{"type":"string","example":"refund"}}},"WebhookResponse":{"type":"object","required":["status"],"properties":{"status":{"type":"integer","enum":[0,1]},"account_id":{"type":"string","description":"Echo for confirmation"},"balance":{"type":"integer","description":"New balance after the operation"},"currency":{"type":"string"},"transaction_id":{"type":"string","description":"Echo of the transaction_id you just processed"},"error_code":{"type":"string","description":"When status=1"},"error_id":{"type":"integer","description":"When status=1"},"error_message":{"type":"string","description":"When status=1"}}}}},"x-scalar-order":["repackzfun-game-platform-api-100/description/introduction","repackzfun-game-platform-api-100/tag/sessions","repackzfun-game-platform-api-100/tag/games","repackzfun-game-platform-api-100/tag/transactions","repackzfun-game-platform-api-100/tag/rounds","repackzfun-game-platform-api-100/tag/players","repackzfun-game-platform-api-100/tag/webhooks","repackzfun-game-platform-api-100/models"]}