# Reserve the ticket

Is used when player reserves a ticket (betslip). It creates a not wagered ticket. Once the player pays for the ticket its status is changed to open. In case of not successful response a `ticket_discard` action will be called. In case of not successful call of `ticket_discard` action, call should be repeated after 30 mins.

Request fields:

<table><thead><tr><th width="210">Attribute</th><th width="117">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>ticket_id</td><td>string</td><td>Ticket identification number</td></tr><tr><td>ticket_code</td><td>string</td><td>Ticket code</td></tr><tr><td>player_id</td><td>string</td><td>Player identification number or code</td></tr><tr><td>psp</td><td>string</td><td>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>stake</td><td>integer</td><td>Ticket stake. Should be in integer format (cents). For example, for stake <code>33.45</code> the value will be <code>3345</code></td></tr><tr><td>wht_amount</td><td>integer</td><td>Player withholding tax amount. Should be in integer format (cents). For example, for withholding tax amount <code>4.55</code> the value will be <code>455</code></td></tr><tr><td>wht</td><td>float</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="/pages/X7kpzRZfS4vnwo3UUQLa">/pages/X7kpzRZfS4vnwo3UUQLa</a>) </td></tr><tr><td>gross_payout</td><td>integer</td><td>Ticket gross payout. Should be in integer format (cents). For example, for gross payout <code>30.45</code> the value will be <code>3045</code></td></tr><tr><td>net_payout</td><td>integer</td><td>Ticket net payout. Should be in integer format (cents). For example, for net payout <code>30.45</code> the value should be <code>3045</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</td></tr><tr><td>rtag</td><td>string or null</td><td>Optional referral Tag or referral ID. </td></tr><tr><td>ticket_type</td><td>string</td><td>Ticket Type (see <a data-mention href="/pages/X7kpzRZfS4vnwo3UUQLa">/pages/X7kpzRZfS4vnwo3UUQLa</a>)</td></tr></tbody></table>

Sample request:

```json
{
    "action": "ticket_reserve",
    "data": {
        "operator": "acme",
        "ticket_id": "668ef666333180bba97f0c93",
        "ticket_code": "CD4BDD",
        "player_id": "sometokenvalue",
        "psp": "mobile",
        "price": 500,
        "stake": 444,
        "wht_amount": 240,
        "wht": 10.0,
        "ext_amount": 56,
        "ext": 12.5,
        "ext_type": "inclusive",
        "gross_payout": 2842,
        "net_payout": 2602,
        "currency": "USD",
        "atag": null,
        "rtag": "rh3hg434h32",
        "ticket_type": "quickbet",
    },
}

```

Sample response:

```
Response: 200
Doesn't require any payload
```


---

# 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/pam-platform-api/reserve-the-ticket.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.
