# Superbet

Reserve superbet ticket.

Request fields:

<table><thead><tr><th width="145">Attribute</th><th width="139">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>operator</td><td>string</td><td>Name of the operator as registered on the system</td></tr><tr><td>token</td><td>string</td><td>Player identification token</td></tr><tr><td>psp</td><td>string or null</td><td>Optional payment service provider or method used to pay for the ticket. E.g mobile, brite, pawapay</td></tr><tr><td>price</td><td>integer</td><td>Ticket price. Should be in integer format (cents). For example, for price <code>35.00</code> the value will be <code>3500</code></td></tr><tr><td>currency</td><td>string</td><td>Currency code in <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO 4217</a> three letter format</td></tr><tr><td>atag</td><td>string or null</td><td>Optional affiliate Tag or Affiliate ID. If parameter is present then it is added to the <code>ticket_reserve</code> PAM API call.</td></tr><tr><td>rtag</td><td>string or null</td><td>Optional referral Tag or referral ID. If parameter is present then it is added to the <code>ticket_reserve</code> PAM API call.</td></tr><tr><td>source</td><td>string</td><td>Ticket source (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>type</td><td>string</td><td><code>superbet</code> Ticket Type (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>event</td><td>integer</td><td>Event id</td></tr><tr><td>bets</td><td>list of integers</td><td>Each element is event bet id</td></tr></tbody></table>

Sample request to reserve `superbet` ticket:

```json
{
    "operator": "site",
    "token": "sGhx12skwrXsukbZmWh7bkCC9YPEzYQKtKSe9EfCth3Q",
    "psp": "mobile",
    "price": 2000,
    "currency": "KES",
    "atag": "affiliate-1",
    "rtag": null,
    "source": "mobile",
    "type": "superbet",
    "event": 100001,
    "bets": [101, 102, 103, 104, 105, 106]
}
```

Response fields:

<table><thead><tr><th width="231">Attribute</th><th width="122">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Ticket id</td></tr><tr><td>code</td><td>string</td><td>Ticket code</td></tr><tr><td>price</td><td>integer</td><td>Ticket price. Should be in integer format (cents). For example, for price <code>35.00</code> the value will be <code>3500</code></td></tr><tr><td>stake</td><td>integer</td><td>Ticket amount. Should be in integer format (cents). For example, for stake <code>30.45</code> the value should be <code>3045</code></td></tr><tr><td>gross_payout</td><td>integer</td><td>Ticket gross payout. Should be in integer format (cents). Will always be <code>0</code></td></tr><tr><td>net_payout</td><td>integer</td><td>Ticket net payout. Should be in integer format (cents). Will always be <code>0</code></td></tr><tr><td>wht_amount</td><td>integer</td><td>Player withholding tax amount. Should be in integer format (cents). Will always be <code>0</code></td></tr><tr><td>wht</td><td>integer</td><td>Player withholding tax percentage. For example, for withholding tax percentage <code>20.0%</code> the value should be <code>20.0</code></td></tr><tr><td>ext_amount</td><td>integer</td><td>Ticket exercise tax amount. Should be in integer format (cents). For example, for exercise tax amount <code>1.25</code> the value will be <code>125</code></td></tr><tr><td>ext</td><td>float</td><td>Ticket exercise tax percentage. For example, for exercise tax percentage <code>12.5%</code> the value should be <code>12.5</code></td></tr><tr><td>ext_type</td><td>string</td><td>Exercise tax type (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>currency</td><td>string</td><td>Currency code in <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO 4217</a> three letter format</td></tr><tr><td>status</td><td>string</td><td>Ticket Status (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>result</td><td>string</td><td>Ticket Result (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>approved</td><td>bool</td><td>Ticket approval (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>source</td><td>string</td><td>Ticket source (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>type</td><td>string</td><td><code>superbet</code> Ticket Type (see <a data-mention href="../fields">fields</a>)</td></tr><tr><td>atag</td><td>string or null</td><td>Optional affiliate Tag or Affiliate ID. If parameter is present then it is added to the <code>ticket_reserve</code> PAM API call.</td></tr><tr><td>rtag</td><td>string or null</td><td>Optional referral Tag or referral ID. If parameter is present then it is added to the <code>ticket_reserve</code> PAM API call.</td></tr><tr><td>aff_instant_comm_amt</td><td>int or null</td><td>Optional instant commission amount of affiliate user (in cents). Actual value may be only in smartbet, jackpot and superbet tickets</td></tr><tr><td>aff_instant_comm_pct</td><td>float or null</td><td>Optional instant commission percentage of affiliate user. Actual value may be only in smartbet, jackpot and superbet tickets</td></tr><tr><td>user_id</td><td>string</td><td>User ID from PAM</td></tr><tr><td>psp</td><td>string</td><td>Payment service provider or payment method name</td></tr><tr><td>created</td><td>string</td><td>Ticket created datetime, UTC. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>operator_time_created</td><td>string</td><td>Ticket created datetime, operator timezone. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>updated</td><td>string</td><td>Ticket updated datetime, UTC. Format - <code>2024-01-28T14:33:01.000000</code></td></tr><tr><td>operator_time_updated</td><td>string</td><td>Ticket updated datetime, operator timezone. Format - <code>2024-01-28T14:33:01.000000</code></td></tr></tbody></table>

Sample response (status=200) to `superbet` ticket:

```json
{
    "id": "66902734beba20ff2df5c79f",
    "code": "DEC4C0",
    "price": 1000,
    "stake": 889,
    "gross_payout": 0,
    "net_payout": 0,
    "wht_amount": 0,
    "wht": 10.0,
    "ext_amount": 111,
    "ext": 12.5,
    "ext_type": "inclusive",
    "currency": "USD",
    "status": "reserved",
    "result": "pending",
    "approved": true,
    "source": "desktop",
    "type": "superbet",
    "atag": "atag_value",
    "rtag": null,
    "aff_instant_comm_amt": 178,
    "aff_instant_comm_pct": 20,
    "user_id": "token_or_user_id",
    "psp": "mobile",
    "created": "2024-07-11T18:40:52.995000",
    "operator_time_created": "2024-07-11T20:40:52.995000",
    "updated": "2024-07-11T18:40:53.013000",
    "operator_time_updated": "2024-07-11T20:40:53.013000"
}
```

Response status codes:

<table><thead><tr><th width="150">Status Code</th><th>Interpretation</th></tr></thead><tbody><tr><td>200</td><td>OK - Everything worked as expected</td></tr><tr><td>400</td><td>Bad Request. Please check error code in response body (see <a data-mention href="../error-codes">error-codes</a>)</td></tr><tr><td>403</td><td>Forbidden. You do not have access for such request</td></tr><tr><td>422</td><td>Validation Error. Please check response body for more details</td></tr></tbody></table>

Error response (status=400):

```json
{
    "code": 103,
    "message": "Event with `{event-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 105,
    "message": "Team with `{team-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 106,
    "message": "Market for bet with `{market-id}` identifier is not found"
}
```

Error response (status=400):

```json
{
    "code": 107,
    "message": "Event with `{event-id}` identifier is not available for play because it has already started"
}
```

Error response (status=400):

```json
{
    "code": 111,
    "message": "Duplicate key for code generation"
}
```

Error response (status=400):

```json
{
    "code": 112,
    "message": "Operator with `{operator-id}` name is not found"
}
```

Error response (status=400):

```json
{
    "code": 114,
    "message": "No webhook url for operator with `{operator-id}` name"
}
```

Error response (status=400):

```json
{
    "code": 115,
    "message": "Operators in request body and in request header are not identical"
}
```

Error response (status=400):

```json
{
    "code": 116,
    "message": "Market with `{market-id}` code is not allowed"
}
```


---

# 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://developer.betstack.io/bet-engine-api/reserve-ticket-endpoint/superbet.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.
