# Refund

## POST /operator/wallet

> Processes a refund request for a specific transaction.  \
> The balance and transaction values follow ISO 4217 currency subunit conventions.<br>

```json
{"openapi":"3.0.0","info":{"title":"Casino API","version":"1.0.0"},"paths":{"/operator/wallet":{"post":{"description":"Processes a refund request for a specific transaction.  \nThe balance and transaction values follow ISO 4217 currency subunit conventions.\n","tags":["Refund"],"parameters":[{"name":"X-REQUEST-SIGN","in":"header","required":true,"schema":{"type":"string"},"description":"HMAC-SHA256 signature of the raw request body using the shared password.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","is_mobile","currency_code","player_id","action","payload"],"properties":{"amount":{"type":"integer","description":"Amount in subunits."},"is_mobile":{"type":"boolean","description":"True if the request is from a mobile device."},"currency_code":{"type":"string","description":"Identifier of currency (ISO 4217)."},"player_id":{"type":"string","description":"Unique identifier of the player."},"action":{"type":"string","enum":["refund"],"description":"Must be set to \"refund\"."},"payload":{"type":"object","required":["reference","session_token","provider_transfer_data"],"properties":{"reference":{"type":"string","description":"Game reference."},"session_token":{"type":"string","description":"Session token generated on play URL."},"provider_transfer_data":{"type":"object","required":["transaction_id","round_id","refunded_transaction_id"],"properties":{"transaction_id":{"type":"string","description":"Game provider transaction ID."},"round_id":{"type":"string","description":"Game provider round ID."},"refunded_transaction_id":{"type":"string","description":"Original transaction ID to be refunded."},"table_reference":{"type":"string","description":"Current table reference. Required for live casino."}}}}}}}}}},"responses":{"200":{"description":"Refund processed successfully.","content":{"application/json":{"schema":{"type":"object","required":["transaction_id","balance","currency_code"],"properties":{"transaction_id":{"type":"string","description":"Unique identifier of operator transaction."},"balance":{"type":"integer","description":"Updated player balance in subunits."},"currency_code":{"type":"string","description":"Identifier of currency (ISO 4217)."}}}}}},"406":{"description":"Previous transaction not found.","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message."}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://the-bet-brothers.gitbook.io/doc/wallet-api/refund.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
