B2B Commerce Checkout Calculators

Calculators run automatically when you invoke Checkout APIs. They compute pricing, promotions, taxes, inventory, and shipping for the cart. See Cart Calculate API for calculator execution details.

Diagram showing how checkout calculators compute taxes, shipping, and promotions during the B2B Commerce checkout process

Start Checkout: PUT /commerce/webstores/{webstoreId}/checkouts

Always runs:

  • Pricing
  • Promotions
  • Inventory

Additionally runs if address is available:

  • Shipping
  • Tax

Update Checkout: PATCH /commerce/webstores/{webstoreId}/checkouts/{activeOrCheckoutId}

Runs when payload includes address:

  • Shipping
  • Tax

Runs when payload includes shipping method:

  • Tax

While calculators run, the API returns 202 Accepted. Continue polling GET /commerce/webstores/{webstoreId}/checkouts/{activeOrCheckoutId} until you receive 200 OK, indicating all calculators completed.

Note: Don't invoke another Checkout API until the previous request returns 200 OK.