# Payment Session Timeout

## Fetch Timeout

<mark style="color:blue;">`GET`</mark> `https://api.lahza.io/payment_session_timeout`

Fetch the payment session timeout

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| authorization<mark style="color:red;">\*</mark> | String | Set value to Bearer SECRET\_KEY |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "status": true,
  "message": "Payment session timeout retrieved",
  "data": {
    "payment_session_timeout": 30
  }
}
```

{% endtab %}
{% endtabs %}

## Update Timeout

<mark style="color:orange;">`PUT`</mark> `https://api.lahza.io/payment_session_timeout`

Update the payment session timeout

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| authorization<mark style="color:red;">\*</mark> | String | Set value to Bearer SECRET\_KEY |
| content-type<mark style="color:red;">\*</mark>  | String | Set value to application/json   |

#### Request Body

| Name                                      | Type    | Description                                                                    |
| ----------------------------------------- | ------- | ------------------------------------------------------------------------------ |
| timeout<mark style="color:red;">\*</mark> | Integer | Time before stopping session (in seconds). Set to 0 to cancel session timeouts |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "status": true,
  "message": "Payment session timeout updated",
  "data": {
    "payment_session_timeout": 30
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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://api-docs.lahza.io/api-endpoints/payment-session-timeout.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.
