---
schema_version: "1"
id: bc09f6585c8c0c999dcdd1924026b14990d2d3a73d3262e348ee0be4578a8a6c
title: Start Checkout
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-comm-checkout-start-checkout.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-checkout-start-checkout.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bd3367e72e7a1abf314d0d9a63c448dfe2ddb02012866aeafa4d42769747764f
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Start Checkout

Create a checkout session and initialize background calculators.

**Endpoint:** PUT [`/commerce/webstores/{webstoreId}/checkouts`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_checkouts_start_checkout.htm)

**What happens:**

- Checks for existing checkout session and returns it if found
- Creates new checkout session if none exists
- Runs pricing, promotions, and inventory calculators
- Runs shipping and tax calculators if address is available

![Diagram of the start checkout flow in B2B Commerce showing how a checkout session is initiated from a cart](https://developer.salesforce.com/media/d2c-commerce/commerce-start-checkout.png '{"class": "image-lg", "title": "Start Checkout"}')

**Request parameters:**

- `cartId` (string) — **Required**. The ID of the shopping cart.
- `deliveryAddressInput` — **Optional**. Input for the delivery address.
- `customFields` — **Optional**. Custom fields to include.

**Response includes:**

- `checkoutId`
- `deliveryGroups`
- `contactInfo`
- `errors`
- `statusCode`
- `cartSummary`
- `orderReferenceNumber`
- `customFields`

**Processing and Validation Steps:**

- The system validates access to the specified webstore.
- The system validates access to the shopping cart (`cartId`).
- The system validates the cart status.
- If `deliveryAddressInput` is provided, the system validates the delivery address.
- The system checks if an active Checkout Session already exists for the cart; if so, the system retrieves and returns it.
- If no existing Checkout Session is found, the system creates a new session and returns the `checkoutId` in the response.
- If `shouldUseDefaultAddress` is set to true, the system retrieves and validates the address associated with the Contact Point Address (CPA) or Profile. The system then applies this address to the CartDeliveryGroup object.
- For guest users, if the request includes `deliveryAddressInput`, the system validates the provided address and applies it to the CartDeliveryGroup object.

**Response codes:**

- 200 OK – Checkout session ready, all calculations complete
- 202 Accepted – Processing in progress, poll GET endpoint until you receive 200
