# Managing web checkout

## Getting web checkout

The [`GET /web-checkout`](https://docs.digitalriver.com/commerce-api-references/shopper-apis/cart/web-checkout#v1-shoppers-me-carts-active-web-checkout) request transfers the shopper to Digital River-hosted storefront pages. The response returns a `302 Found` with a location to the Digital River-hosted storefront pages.

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/web-checkout' \
--header 'Content-Type:  application/json' \
--header 'authorization: Basic ***\
```

{% endtab %}
{% endtabs %}

## Creating the cart and transferring the shopper

The [`POST /web-checkout`](https://docs.digitalriver.com/commerce-api-references/shopper-apis/cart/web-checkout#v1-shoppers-me-carts-active-web-checkout-1) request creates the cart and transfers the shopper to the Digital River-hosted storefront pages. The response returns a `302 Found` with a location to the Digital River-hosted storefront pages.

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/web-checkout' \
--header 'authorization: bearer ***\
...
--data-raw '{
  "cart": {
    "lineItems": {
      "lineItem": {
        "quantity": "15",
        "product": {
          "id": "12345",
          "externalReferenceId": "12345",
          "companyId": "company"
        }
      }
    },
    "offers": {
      "offerId": "1234567890"
    }
  }
}'
```

{% 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://docs.digitalriver.com/commerce-api/shopper-apis/cart/managing-web-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.
