command

Checkout Cart

Command to check out a shopping cart.

Command
POST/carts/{cartId}/checkout

Overview

CheckoutCart is handled by the Cart APICart APIServicev1.0.0The public-facing API for shopping carts. Handles commands to add and remove items and to check out, and publishes an ev...Publishescart-checked-out, calculate-discountSubscribesadd-item-to-cart, remove-item-from-cart +1APIsOpenAPIOwnershopping-platformMapRepoView docs. It finalises the cart — pricing it (including discounts from the Promotion SystemPromotion SystemSystemv1.0.0Internal system that calculates the discounts and promotions that apply to a cart. It owns promotion rules and returns c...Ownershopping-platformMapView docs) — and on success publishes a Cart Checked OutCart Checked OutEventv1.0.0Published when a customer has checked out their cart. Ownershopping-platformSchemaMapView docs event.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

3 properties

Command to check out a shopping cart

cartIdstring<uuid>
required

Unique identifier of the cart to check out

customerIdstring<uuid>
required

Identifier of the customer checking out

promotionCodestring

Optional promotion code to apply at checkout