> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.wuzzlo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.wuzzlo.com/_mcp/server.

# Debit player balance for a bet

POST /betrequest
Content-Type: application/json

Wuzzlo to Operator. Verify the Wuzzlo signature and debit amount atomically. A new debit returns OP_SUCCESS. The same reqId returns OP_DUPLICATE_REQUEST. A new reqId with an existing debit transactionId returns OP_DUPLICATE_TRANSACTION. Insufficient funds returns OP_INSUFFICIENT_FUNDS. All non-success scenarios leave balance unchanged.

Reference: https://docs.wuzzlo.com/wuzzlo/wuzzlo-to-operator/debit-player-balance-for-a-bet

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /betrequest:
    post:
      operationId: debitPlayerBalanceForABet
      summary: Debit player balance for a bet
      description: >-
        Wuzzlo to Operator. Verify the Wuzzlo signature and debit amount
        atomically. A new debit returns OP_SUCCESS. The same reqId returns
        OP_DUPLICATE_REQUEST. A new reqId with an existing debit transactionId
        returns OP_DUPLICATE_TRANSACTION. Insufficient funds returns
        OP_INSUFFICIENT_FUNDS. All non-success scenarios leave balance
        unchanged.
      tags:
        - wuzzloToOperator
      parameters:
        - name: Signature
          in: header
          description: >-
            Wuzzlo-to-Operator: Base64 RSA-SHA256 PKCS#1 v1.5 signature of the
            exact UTF-8 JSON body, verified with the Wuzzlo public key.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            HTTP 200 debit response. The body status MUST be the single exact
            value assigned to the matching scenario; statuses are not
            interchangeable.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Wuzzlo to
                  Operator_debitPlayerBalanceForABet_Response_200
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BetRequest'
components:
  schemas:
    BetRequest:
      type: object
      properties:
        operatorId:
          type: string
        token:
          type: string
        sessionToken:
          type: string
          description: Operator session token validated through /auth/login.
        userId:
          type: string
        reqId:
          type: string
          description: >-
            Durable idempotency key. An exact replay must return
            OP_DUPLICATE_REQUEST without changing balance.
        transactionId:
          type: string
          description: Logical wallet transaction identifier shared by the debit lifecycle.
        gameId:
          type: string
        roundId:
          type: string
        amount:
          type: number
          format: double
          description: Authoritative monetary amount. Use decimal-safe arithmetic.
        debitAmount:
          type: number
          format: double
        settlementKind:
          type: string
        settlementStatus:
          type: string
        resultStatus:
          type: string
        betType:
          type: string
      required:
        - operatorId
        - sessionToken
        - userId
        - reqId
        - transactionId
        - gameId
        - roundId
        - amount
      title: BetRequest
    BetrequestPostResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
        - OP_SUCCESS
        - OP_DUPLICATE_REQUEST
        - OP_DUPLICATE_TRANSACTION
        - OP_INSUFFICIENT_FUNDS
      description: >-
        Exact business status required by the matched endpoint scenario. A
        different status is a contract failure even when the returned balance is
        correct.
      title: BetrequestPostResponsesContentApplicationJsonSchemaStatus
    Wuzzlo to Operator_debitPlayerBalanceForABet_Response_200:
      type: object
      properties:
        balance:
          type: number
          format: double
          description: >-
            Balance returned for this response scenario. Successful mutations
            return the calculated post-transaction balance; duplicate and
            rejected scenarios return the unchanged balance.
        status:
          $ref: >-
            #/components/schemas/BetrequestPostResponsesContentApplicationJsonSchemaStatus
          description: >-
            Exact business status required by the matched endpoint scenario. A
            different status is a contract failure even when the returned
            balance is correct.
      required:
        - balance
        - status
      title: Wuzzlo to Operator_debitPlayerBalanceForABet_Response_200
  securitySchemes:
    WuzzloSignature:
      type: apiKey
      in: header
      name: Signature
      description: >-
        Wuzzlo-to-Operator: Base64 RSA-SHA256 PKCS#1 v1.5 signature of the exact
        UTF-8 JSON body, verified with the Wuzzlo public key.

```

## Examples

### New valid debit: OP_SUCCESS



**Request**

```json
{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}
```

**Response**

```json
{
  "balance": 49900,
  "status": "OP_SUCCESS"
}
```

**SDK Code**

```python New valid debit: OP_SUCCESS
import requests

url = "https://api.example.com/betrequest"

payload = {
    "operatorId": "string",
    "sessionToken": "string",
    "userId": "string",
    "reqId": "string",
    "transactionId": "string",
    "gameId": "string",
    "roundId": "string",
    "amount": 1.1
}
headers = {
    "Signature": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript New valid debit: OP_SUCCESS
const url = 'https://api.example.com/betrequest';
const options = {
  method: 'POST',
  headers: {Signature: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"operatorId":"string","sessionToken":"string","userId":"string","reqId":"string","transactionId":"string","gameId":"string","roundId":"string","amount":1.1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go New valid debit: OP_SUCCESS
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/betrequest"

	payload := strings.NewReader("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Signature", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby New valid debit: OP_SUCCESS
require 'uri'
require 'net/http'

url = URI("https://api.example.com/betrequest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Signature"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}"

response = http.request(request)
puts response.read_body
```

```java New valid debit: OP_SUCCESS
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/betrequest")
  .header("Signature", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")
  .asString();
```

```php New valid debit: OP_SUCCESS
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/betrequest', [
  'body' => '{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Signature' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp New valid debit: OP_SUCCESS
using RestSharp;

var client = new RestClient("https://api.example.com/betrequest");
var request = new RestRequest(Method.POST);
request.AddHeader("Signature", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift New valid debit: OP_SUCCESS
import Foundation

let headers = [
  "Signature": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/betrequest")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Same reqId replay: OP_DUPLICATE_REQUEST



**Request**

```json
{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}
```

**Response**

```json
{
  "balance": 49900,
  "status": "OP_DUPLICATE_REQUEST"
}
```

**SDK Code**

```python Same reqId replay: OP_DUPLICATE_REQUEST
import requests

url = "https://api.example.com/betrequest"

payload = {
    "operatorId": "string",
    "sessionToken": "string",
    "userId": "string",
    "reqId": "string",
    "transactionId": "string",
    "gameId": "string",
    "roundId": "string",
    "amount": 1.1
}
headers = {
    "Signature": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Same reqId replay: OP_DUPLICATE_REQUEST
const url = 'https://api.example.com/betrequest';
const options = {
  method: 'POST',
  headers: {Signature: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"operatorId":"string","sessionToken":"string","userId":"string","reqId":"string","transactionId":"string","gameId":"string","roundId":"string","amount":1.1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Same reqId replay: OP_DUPLICATE_REQUEST
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/betrequest"

	payload := strings.NewReader("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Signature", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Same reqId replay: OP_DUPLICATE_REQUEST
require 'uri'
require 'net/http'

url = URI("https://api.example.com/betrequest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Signature"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}"

response = http.request(request)
puts response.read_body
```

```java Same reqId replay: OP_DUPLICATE_REQUEST
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/betrequest")
  .header("Signature", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")
  .asString();
```

```php Same reqId replay: OP_DUPLICATE_REQUEST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/betrequest', [
  'body' => '{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Signature' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Same reqId replay: OP_DUPLICATE_REQUEST
using RestSharp;

var client = new RestClient("https://api.example.com/betrequest");
var request = new RestRequest(Method.POST);
request.AddHeader("Signature", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Same reqId replay: OP_DUPLICATE_REQUEST
import Foundation

let headers = [
  "Signature": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/betrequest")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION



**Request**

```json
{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}
```

**Response**

```json
{
  "balance": 49900,
  "status": "OP_DUPLICATE_TRANSACTION"
}
```

**SDK Code**

```python Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
import requests

url = "https://api.example.com/betrequest"

payload = {
    "operatorId": "string",
    "sessionToken": "string",
    "userId": "string",
    "reqId": "string",
    "transactionId": "string",
    "gameId": "string",
    "roundId": "string",
    "amount": 1.1
}
headers = {
    "Signature": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
const url = 'https://api.example.com/betrequest';
const options = {
  method: 'POST',
  headers: {Signature: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"operatorId":"string","sessionToken":"string","userId":"string","reqId":"string","transactionId":"string","gameId":"string","roundId":"string","amount":1.1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/betrequest"

	payload := strings.NewReader("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Signature", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
require 'uri'
require 'net/http'

url = URI("https://api.example.com/betrequest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Signature"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}"

response = http.request(request)
puts response.read_body
```

```java Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/betrequest")
  .header("Signature", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")
  .asString();
```

```php Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/betrequest', [
  'body' => '{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Signature' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
using RestSharp;

var client = new RestClient("https://api.example.com/betrequest");
var request = new RestRequest(Method.POST);
request.AddHeader("Signature", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Existing transactionId with new reqId: OP_DUPLICATE_TRANSACTION
import Foundation

let headers = [
  "Signature": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/betrequest")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Insufficient balance: OP_INSUFFICIENT_FUNDS



**Request**

```json
{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}
```

**Response**

```json
{
  "balance": 2500,
  "status": "OP_INSUFFICIENT_FUNDS"
}
```

**SDK Code**

```python Insufficient balance: OP_INSUFFICIENT_FUNDS
import requests

url = "https://api.example.com/betrequest"

payload = {
    "operatorId": "string",
    "sessionToken": "string",
    "userId": "string",
    "reqId": "string",
    "transactionId": "string",
    "gameId": "string",
    "roundId": "string",
    "amount": 1.1
}
headers = {
    "Signature": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Insufficient balance: OP_INSUFFICIENT_FUNDS
const url = 'https://api.example.com/betrequest';
const options = {
  method: 'POST',
  headers: {Signature: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"operatorId":"string","sessionToken":"string","userId":"string","reqId":"string","transactionId":"string","gameId":"string","roundId":"string","amount":1.1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Insufficient balance: OP_INSUFFICIENT_FUNDS
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/betrequest"

	payload := strings.NewReader("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Signature", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Insufficient balance: OP_INSUFFICIENT_FUNDS
require 'uri'
require 'net/http'

url = URI("https://api.example.com/betrequest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Signature"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}"

response = http.request(request)
puts response.read_body
```

```java Insufficient balance: OP_INSUFFICIENT_FUNDS
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/betrequest")
  .header("Signature", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}")
  .asString();
```

```php Insufficient balance: OP_INSUFFICIENT_FUNDS
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/betrequest', [
  'body' => '{
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Signature' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Insufficient balance: OP_INSUFFICIENT_FUNDS
using RestSharp;

var client = new RestClient("https://api.example.com/betrequest");
var request = new RestRequest(Method.POST);
request.AddHeader("Signature", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"operatorId\": \"string\",\n  \"sessionToken\": \"string\",\n  \"userId\": \"string\",\n  \"reqId\": \"string\",\n  \"transactionId\": \"string\",\n  \"gameId\": \"string\",\n  \"roundId\": \"string\",\n  \"amount\": 1.1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Insufficient balance: OP_INSUFFICIENT_FUNDS
import Foundation

let headers = [
  "Signature": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "operatorId": "string",
  "sessionToken": "string",
  "userId": "string",
  "reqId": "string",
  "transactionId": "string",
  "gameId": "string",
  "roundId": "string",
  "amount": 1.1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/betrequest")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```