> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/storefronts/manage-cart-and-checkout/send-customer-to-the-checkout.md).

# Send customer to the checkout

### `Ecwid.Cart.canGotoCheckout()`

This method checks whether you can send customers to the first step of the checkout called the **shopping cart**.&#x20;

It has one `callback` argument containing the boolean response. If `true`, you can send customers to the checkout with the `Ecwid.Cart.gotoCheckout()` method.

```javascript
Ecwid.Cart.canGotoCheckout(function(callback){
  console.log(callback);
});

// prints
// true
```

You can only receive `false` with this method if the store works through an old storefront and the *Ecwid admin > Settings > Legal > Terms & Conditions toggle* is enabled.

### `Ecwid.Cart.gotoCheckout()`

This method sends a customer to the **first or second checkout step**.

This method works differently depending on the *Ecwid admin > Settings > Legal > Terms & Conditions toggle* and whether the customer has already left an email in the shopping cart:&#x20;

* **No email**: the customer is sent to the shopping cart page.
* **Email + toggle disabled**: the customer is sent to the second checkout page (address details)
* **Email + toggle disabled + no shipping**: the customer is sent to the payment page.

Code example:

```javascript
Ecwid.Cart.gotoCheckout(function(){
  console.log("Checkout process started");
});

// prints
// Checkout process started
// Customer is redirected to the checkout
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ecwid.com/storefronts/manage-cart-and-checkout/send-customer-to-the-checkout.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.
