# Update a checkout session (https://developer.godaddy.com/en/docs/references/rest/shopping/update-checkout)

---
title: Update a checkout session
description: Replace the writable checkout session state.
full: true
---

Full description

> Replace the writable checkout session state. Send the full `line_items[]` collection on every request. Omitted writable values are cleared, and server-generated fields are ignored. For POS and hardware products, retain the `commerce_location` input. If a submitted product cannot be priced, the response excludes it and includes a `line_item_removed` warning.

## PUT /checkout-sessions/{id}

Update a checkout session

Replace the writable checkout session state. Send the full `line_items[]` collection on every request. Omitted writable values are cleared, and server-generated fields are ignored. For POS and hardware products, retain the `commerce_location` input. If a submitted product cannot be priced, the response excludes it and includes a `line_item_removed` warning.


### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The unique identifier of the checkout session. |

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Request-Id` | string <uuid> | yes | For tracing the request across network layers and components. |
| `Idempotency-Key` | string | yes | Ensures duplicate operations don't happen during retries. |

### Request body (required)

Content-Type: `application/json`

```json
{
  "line_items": [
    {
      "id": "li_hosting_1",
      "item": {
        "id": "hosting-deluxeapi:1mo"
      },
      "quantity": 1
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "profile_mastercard",
        "handler_id": "com.godaddy.payments",
        "type": "card",
        "selected": true
      }
    ]
  }
}
```

Schema:

- schema reference: `#/components/schemas/checkout_writable_request`

### Responses

**200** — Updated checkout session or an error envelope.

Content-Type: `application/json`

```json
{
  "ucp": {
    "version": "2026-04-08",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-04-08"
        }
      ],
      "com.godaddy.shopping.input": [
        {
          "version": "2026-04-08"
        }
      ],
      "com.godaddy.shopping.catalog_offer": [
        {
          "version": "2026-04-08"
        }
      ]
    },
    "payment_handlers": {
      "com.godaddy.payments": [
        {
          "id": "com.godaddy.payments",
          "version": "2026-04-08"
        }
      ]
    }
  },
  "id": "d9cf79e3-b39b-4e58-8f30-ddfe1619e969",
  "line_items": [
    {
      "id": "li_1",
      "item": {
        "id": "hosting-deluxeapi:1mo",
        "title": "Web Hosting Deluxe — 1 Month",
        "price": 1099
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1099
        },
        {
          "type": "total",
          "amount": 1099
        }
      ]
    }
  ],
  "status": "ready_for_complete",
  "currency": "USD",
  "totals": [
    {
      "type": "subtotal",
      "amount": 1099
    },
    {
      "type": "total",
      "amount": 1099
    }
  ],
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://www.godaddy.com/legal/agreements/privacy-policy"
    },
    {
      "type": "terms_of_service",
      "url": "https://www.godaddy.com/legal/agreements/terms-of-service"
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "profile_visa",
        "handler_id": "com.godaddy.payments",
        "type": "card",
        "selected": true,
        "display": {
          "brand": "visa",
          "last_digits": "4242"
        }
      },
      {
        "id": "profile_mastercard",
        "handler_id": "com.godaddy.payments",
        "type": "card",
        "selected": false,
        "display": {
          "brand": "mastercard",
          "last_digits": "4444"
        }
      }
    ]
  }
}
```

Schema:

- oneOf(unknown | unknown)

**400** — Request validation or caller-correctable business error.

Content-Type: `application/json`

```json
{
  "ucp": {
    "version": "2026-04-08",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "invalid_request",
      "content": "Lookup request must include at least one id.",
      "severity": "recoverable"
    }
  ]
}
```

Schema:

- schema reference: `#/components/schemas/error_response`

**401** — Missing or invalid credentials.

**403** — Authenticated credential lacks the required Shopping scope.

**404** — Resource does not exist.

Content-Type: `application/json`

```json
{
  "ucp": {
    "version": "2026-04-08",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "product_not_found",
      "content": "Product not found: not-a-real-product",
      "severity": "unrecoverable"
    }
  ]
}
```

Schema:

- schema reference: `#/components/schemas/error_response`

**422** — Request is syntactically valid but cannot be processed in its current state.

Content-Type: `application/json`

```json
{
  "ucp": {
    "version": "2026-04-08",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "unsupported_currency",
      "content": "Currency not supported: ZZZ",
      "severity": "recoverable"
    }
  ]
}
```

Schema:

- schema reference: `#/components/schemas/error_response`

**429** — Too many requests.

**Security:** requires `bearerAuth`.
