> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/samita-countdown-timer-bar/cart-countdown/when-time-expires.md).

# When the cart timer expires

The three things a cart countdown can do when it reaches zero, and how to choose between them.

A cart countdown is the only type whose ending can change the shopper's cart. The **Action after time expired** setting, on the **Display** tab, decides what happens.

<figure><img src="https://855148666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaOJwtwIUCsbYLCDqZD0u%2Fuploads%2Fgit-blob-edc7fbfcfab75f9a089ddefebdd2c83b4a582955%2Fscreenshot-cart-action-expired.png?alt=media" alt="The Action after time expired options with the redirect URL field"><figcaption><p>Action after time expired, on the Display tab of a cart countdown.</p></figcaption></figure>

## The three options

| Option                                       | What happens at zero                                            |
| -------------------------------------------- | --------------------------------------------------------------- |
| **Go to the homepage without clearing cart** | The shopper is sent to your home page. Their cart is untouched  |
| **Hide the message and do nothing**          | The countdown disappears. Nothing else changes                  |
| **Clear the cart and redirect to**           | The cart is emptied and the shopper is sent to a URL you choose |

## Go to the homepage without clearing cart

The default. When the timer runs out, the shopper is moved to your home page, but everything they added is still in the cart.

It interrupts without costing them anything, which is the balance most stores want. The interruption is still real, though — a shopper who stepped away mid-checkout comes back to a different page than the one they left.

## Hide the message and do nothing

The timer disappears and the shopper carries on exactly where they were.

This is the gentlest option and the one to pick if you're unsure. The countdown does its job while it's running — a visible clock next to the checkout button — and simply stops when it's done, with no page change and nothing lost.

## Clear the cart and redirect to

The cart is emptied and the shopper is sent to the URL you enter. Leave the URL field empty and they stay on the page they're on, with an empty cart.

{% hint style="danger" %}
This deletes the shopper's cart. Someone who left a tab open over lunch comes back to find their selections gone, with no way to recover them. Every item has to be found and added again — which, for a large cart, is the point at which many shoppers leave instead.
{% endhint %}

Use it only when the empty cart reflects something real — a genuine reservation system where holding stock any longer would be wrong — and make sure your message says so plainly before it happens.

## Choosing

| Your goal                         | Use                                          |
| --------------------------------- | -------------------------------------------- |
| Nudge shoppers without risk       | **Hide the message and do nothing**          |
| Interrupt, but keep the cart safe | **Go to the homepage without clearing cart** |
| Genuinely release a reservation   | **Clear the cart and redirect to**           |

## Match your message to the action

The message and the action are set in different tabs, which makes them easy to leave out of step. The default message says "Your cart will be lost" — true only with the clearing action, and a broken promise with either of the others.

| Action                                   | A message that matches                              |
| ---------------------------------------- | --------------------------------------------------- |
| Hide the message and do nothing          | `Complete your order within {timer}`                |
| Go to the homepage without clearing cart | `Finishing up? You have {timer} left`               |
| Clear the cart and redirect to           | `🔥 Hurry up! Your cart will be lost in {timer} !!` |

## Test it before you rely on it

Set the duration to a minute or two in a draft, add something to your cart in a private browser window, and watch the timer run out. Whichever action you chose, you should see exactly what a shopper would.

Put the real duration back before saving it as Active.

## Next steps

* [Create a cart countdown](/samita-countdown-timer-bar/cart-countdown/create.md)
* [Cart countdown overview](/samita-countdown-timer-bar/cart-countdown/overview.md)
* [Manage countdowns](/samita-countdown-timer-bar/countdowns/manage.md)
* [FAQ](/samita-countdown-timer-bar/help/faq.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samita.io/samita-countdown-timer-bar/cart-countdown/when-time-expires.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
