# 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 %}
